subject

Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies. Ex: If the input is:0 or less than 0, the output is:No change Ex: If the input is:45the output is:1 Quarter2 Dimes Fix code please getting error on code#include #include int main(){int coin, dollar, quarter, dime, nickel, penny, rem;scanf("%d\n",&coin);if(coin <=0){printf("No change\n");}else{// calculate Dollersdollar = coin/100;rem = coin%100;if(dollar<=1){printf("% d Dollar\n", dollar);}else{printf("%d Dollars\n", dollar);}// calculate Quartersquarter= rem/25;rem= rem%25;if(quarter<=1){printf("%d Quarter\n", quarter);}else{printf("%d Quarters\n", quarter);}// calculate Dimesdime= rem/10;rem= rem%10;if(quarter<=1){printf("%d Dime\n", dime);}else{printf("%d Dimes\n", dime);}// calculate Nickelsnickel= rem/5;rem= rem%5;if(nickel<=1){printf("%d Nickel\n", nickel);}else{printf("%d Nickels\n", nickel);}// calculate Penniespenny= rem;if(penny<=1){printf("%d Penny\n", penny);}else{printf("d Pennies\n", penny);}return 0}ERROR below: Compare outputkeyboard_arrow_up0 / 2Output differs. See highlights below. Special character legendInput45Your output0 Dollar 1 Quarter 2 Dime 0 Nickel 0 PennyExpected output1 Quarter 2 Dimes2: Compare outputkeyboard_arrow_up2 / 2Input0Your outputNo change3: Compare outputkeyboard_arrow_up0 / 2Output differs. See highlights below. Special character legendInput156Your output1 Dollar 2 Quarters 0 Dimes 1 Nickel 1 PennyExpected output1 Dollar 2 Quarters 1 Nickel 1 Penny4: Compare outputkeyboard_arrow_up0 / 2Output differs. See highlights below. Special character legendInput300Your output3 Dollars 0 Quarter 0 Dime 0 Nickel 0 PennyExpected output3 Dollars

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:00
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. peter has launched a website that features baby products. however, clients often find they are unable to access the website because the server is down. which feature of cybersecurity should peter focus on for his website? a. data authenticity b. data privacy c. data availability d. data integrity e. data encryption
Answers: 3
question
Computers and Technology, 24.06.2019 04:30
1. web and mobile applications allow users to be actively engaged in an online activity. a true b false 2. some examples of business applications purposes are to collaborate, share files, meet virtually in real-time, and accept payments. a true b false 3. an education application would most likely do which of the following? a allow users to watch popular movies and tv shows b connect users with social and business contacts c confirm users' travel plans d teach users a new language 4. a uniform resource locator (url) is how the internet knows where to take users when an address is typed into a browser. a true b false 5. deon is required to provide the citation information for his sources. what type of information should he collect from his sources? a author name, title, date of publication, date of access, url b connections to background information c interesting facts and statistics d notes on important information
Answers: 1
question
Computers and Technology, 25.06.2019 05:30
Two technicians are discussing a resistance measurement. technician a states that components being measured should be removed or isolated from the circuit. technician b states that power to the circuit should be disconnected when measuring resistance. which technician is correct?
Answers: 1
You know the right answer?
Write a program with total change amount as an integer input, and output the change using the fewest...
Questions
question
English, 11.12.2021 20:20
question
Mathematics, 11.12.2021 20:20
question
Chemistry, 11.12.2021 20:20
question
Physics, 11.12.2021 20:20
question
History, 11.12.2021 20:20
question
Mathematics, 11.12.2021 20:30