All pastes #39555 Raw Edit

HELP PLEASE!!!

public text v1 · immutable
#39555 ·published 2006-02-02 04:42 UTC
rendered paste body
i'm wondering if anyone can write a real quick C program for the following.  It would be very helpful for a reference.

Write a program using C language pointers that will let a user input a money amount and convert that amount into a number of quarters, dimes, nickels, and pennies(use largest monetary denominations that you can).  Also make 3 functions and pointers for pass by reference as described below:

1.)	An input function that will take the amount by reference.  The function will prompt and input the amount from the user.
2.)	A change function that will send the amount by value and the quarters, dimes, nickels, and pennies by reference.  Convert the amount into the number of quarters, dimes, nickels, and pennies.
***Round the results by using the math floor function (a * 100 + .5) where “a” is the amount left over.

3.) A print functions that will send the amount of quarters, dimes, nickels, and pennies by reference and print them out.