0

Hey everyone I'm new here and I need help with a homework assignment that allows the user to make change.

The assignment is as follows: You will write a program that will calculate the minimal amount of coins needed to make change for some amount of cents. The program will accept as input an integer amount in cents. If the amount is positive, it will calculate and display the minimal number of quarters, dimes, nickels, and pennies required to make that amount.

So far this is what I have and I'm completely lost on what to do next. I was thinking that I either need an if statement or a do while loop but i'm stumped.

Here is what I have so far.

```
#include <iostream>
using namespace std;
int main()
{
const int QUARTER=25;
const int DIME=10;
const int NICKEL=5;
const int PENNY=1;
int coin=0;
cout << "This program will calculate the minimal number of coins needed\n:;
cout << "in order to make change for a given amount of cents.\n\n";
cout << "Please enter an amount in cents: \n\n";
cin >> coin;
while (coin > 0)
{
```