The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 3 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
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
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------