Question: Using C++ How do I get this program to output how many coins will be given to the user? I placed ??? where I believe

Using C++

How do I get this program to output how many coins will be given to the user?

I placed "???" where I believe I'm missing something.

The end result should look like this (using a test number):

Enter amount of change: .84

Change due is: $0.84

This is the following 8 coins:

3 quarters

0 dimes

1 nickels

4 pennies

My program:

#include using namespace std;

int main() { int totalCents; int rCents = totalCents; int nQ = rCents / 25; rCents = rCents % 25; int nD = rCents / 10; rCents = rCents % 10; int nN = rCents / 5; rCents = rCents % 5; int nP = (rCents); double change; //https://www.youtube.com/watch?v=d2_RQ17Xhvc int x; cout << "Enter amount of change: " ; cin >> change; x = change*100; cout << "Change due is: $ " << change << endl; cout << "This is the following " << ??? << " coins: " << endl; cout << nQ << " Quarters" << endl; cout << nD << " Dimes" << endl; cout << nN << " Nickels" << endl; cout << nP << " Pennies" << endl; return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!