Can you please help me make a c++ program that would ask if how many bills and compute its total, and then ask how many coins you have, and then, also compute its total. i really need help. sorry guys i'm a beginner
//start
#include<iostream>
usingnamespace std;
int main(){
int bills;
int coins;
int choice;
int totalBills=0;
int totalCoins=0;
cout<<"What do you want to total(2 for Coins AND any number for Bills):"<<endl;
cin>>choice;
if (choice==2){
do{
cout<<"Your coins?[-1 to finish]"<<endl;
cin>>coins;
totalCoins=totalCoins+coins;
cout<<"Total:"<< totalCoins<<endl;
}while(coins!=-1);
}
else
{
do{
cout<<"Your Bills?[-1 to finish]"<<endl;
cin>>bills;
totalBills=totalBills+bills;
cout<<"Total:"<< totalBills<<endl;
}while(bills!=-1);
}
return 0;
}
//End