This is the output:
Amount: 69.73
Dollars: 69
Quarters: 2
Dimes: 2
Nickels: 0
Pennies: 3

this is NOT ONLY for 69.73. It's any amount in general. I know how to figure out the amount of dollars needed. But how would you figure out how many quarters, dimes, nickels, and pennies you would need to make up the amount of cents?

The input of the program is only the amount?

You can do it with integer division and the mod operator.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.