What?? Someone please help me out. I can't grasp any of this stuff. I know what the program should do but don't know how to set it up. This forum is my only means of any help. My instructor is never available and doesn't return calls or emails!!
Assignment:
Write a main function and a function named Coins which operates as follows:
o Change has one input – an amount of change to be returned between 0 and 99 cents
o Change has four outputs – the number of quarters, dimes, nickels, and cents to be
returned.
Prompt the user in the main function to enter an integer from 0 to 99 corresponding to an amount of change to be returned.
Call the function in the main program. For example:
Coins(Change, Quarters, Dimes, Nickels, Cents)
The main program should display the number of quarters, dimes, nickels, and cents to be returned (with descriptive names, such as:
Ok. Here is a generic code but how can I put it into a "main" and "function" type program? How do I set up my function program? The main program will out put the return of the function, right? Also this code is getting an error? Any suggestions?
aaronfue, the code you posted is the exact opposite of you description. I thought you stated that the user enters a change amount and YOU return to them the number of coins.
Why are you asking the user for the number of coins?