a program

You go to a bank, you enter your card in the ATM machine, you enter your PIN and then you select to withdraw a certain amount of money.
Write a program that will:
1. Ask the user to enter the $ amount of the cash to be withdrawn.
2. Use a user defined function that will calculate the denominations of the cash in 100, 50, 20, 10, 5, 2, 1, 0.25, 0.10 and 0.05.
3. The main() should display the output.


I need a logic for this program.

The logic is already outlined for you.

Start by asking the user to enter the $ amount per step 1.

Then make a separate function to calculate the denominations per step 2.

Then display the output per step 3.


Make an effort to do it on your own. If you can't get it to work, show us what you have and we'll be able to give you advice. But we're not going to do the work for you.
Topic archived. No new replies allowed.