Answer to Question #172039 in C++ for Alyssa Flores

Question #172039

In the space below write a C++ program that computes the total amount of money you are depositing in your bank account. Your program does this by asking you to first enter the type of cash bills being deposited and how many of each type, also the types of coins being deposited and the number of each coin type


1
Expert's answer
2021-03-16T10:45:24-0400
#include<iostream>
using namespace std;
int main(){
    int amount,a,b,c,d,e,f,g,h,i,j,total_sum;
    


    cout<<"\nEnter the amount of cash= ";
    cin>>amount;
    cout<<"\nEnter the no. of 2000Rs notes= ";
    cin>>a;
    cout<<"\nEnter the no. of 500Rs notes= ";
    cin>>b;
    cout<<"\nEnter the no. of 200Rs notes=";
    cin>>c;
    cout<<"\nEnter the no. of 100Rs notes=";
    cin>>d;
    cout<<"\nEnter the no. of 50Rs notes=";
    cin>>e;
    cout<<"\nEnter the no. of 20Rs notes=";
    cin>>f;
    cout<<"\nEnter the no. of 20Rs notes=";
    cin>>g;
    cout<<"\nEnter the no. of 5Rs notes=";
    cin>>h;
    cout<<"\nEnter the no. of 2Rs notes=";
    cin>>i;
    cout<<"\nEnter the no. of 1Rs notes=";
    cin>>j;
    total_sum=a*2000+b*500+c*200+d*100+e*50+f*20+g*10+h*5+i*2,j*1;
    cout<<"Total sum = "<<total_sum;


return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS