The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
University
| Teaching Since: | Apr 2017 |
| Last Sign in: | 438 Weeks Ago, 1 Day Ago |
| Questions Answered: | 9562 |
| Tutorials Posted: | 9559 |
bachelor in business administration
Polytechnic State University Sanluis
Jan-2006 - Nov-2010
CPA
Polytechnic State University
Jan-2012 - Nov-2016
Professor
Harvard Square Academy (HS2)
Mar-2012 - Present
Write a C program with a function named change() that accepts a single-precision number and the addresses of the integer variables names quarters, dimes, nickels, and pennies. The function should determine the number of quarters, dimes, nickels and pennies in the number passed to it and write these values directly into the respective variables declared in its calling function. Sample output:
Enter an amount of money:Â .98
The number of quarters is 3
The number of dimes is 2
The number of nickels is 0
The number of pennies is 3
Enter an amount of money:Â 2.32
The number of quarters is 9
The number of dimes is 0
The number of nickels is 1
The number of pennies is 1
-----------