In: Computer Science
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
#include <iostream>
using namespace std;
//public class
int main()
{
int q, n, d, c;
cout<<"Enter number of quarters: ";
cin>>q;
cout<<("Enter of dimes: ");
cin>>d;
cout<<("Enter of nickles: ");
cin>>n;
cout<<("Enter of cents: ");
cin>>c;
cout<<"You entered "<<q<<"
Quarters"<<endl;
cout<<"You entered "<<q<<"
Dimes"<<endl;
cout<<"You entered "<<q<<"
Nickels"<<endl;
cout<<"You entered "<<q<<"
Cents"<<endl;
int total = q * 25 + d * 10 + n * 5 + c;
// finding dollors
int dollors = total / 100;
// finding the cents
int cents = total % 100;
cout<<"Your total is "<<dollors<<" Dollars and
"<<cents<<" Cents\n";
return 0;
}
Kindly revert for any queries
Thanks.