Hi, I have an assignment which have 10 questions and I managed to do 9½ of them. Question #6 has 2 parts to it. I managed to finish part a, but can't get part b to work. Please give me some assistance - thank you all in advance.

6. a. Write a program for a bank that allows the user to enter an amount of money in cents. Display the number of whole dollars the bank will give the customer in exchange. This is the solution I was able to compile

Code:
#include<iostream>
using namespace std;

int main()
{

	int cents = 0;
	int dollar = 0;
	cout << "Please enter the amount of money in cents:" << endl;
	cin >> cents; 
	dollar = cents / 100;
	cout << "the whole dollars amount in exchange is: " << dollar << endl << endl;

system("pause");
return 0;

}
Part B is difficult for me:

b. Modify the program in 6a so that, in addition to the cents, the user enters the denomination of the coin to which to convert the pennies, such as 5 for nickels or 25 for quarters.