Question: This program lets the user enter the amount in decimal representing dollars and cents and output a report listing the monetary equivalent in single dollars,

This program lets the user enter the amount in decimal representing dollars and cents and output a report listing the monetary equivalent in single dollars, quarters, dimes, nickels, and pennies. Your program should report maximum number of dollars, then the maximum number of quarters, and so on, in this order.

A sample output is provided in the template

#include  int main() { double amount; // Receive the amount printf("Enter an amount in double, for example 11.56:: "); scanf("%lf", &amount); //int remainingAmount = static_cast(amount * 100); int remainingAmount = (int)(amount * 100); // Find the number of one dollars // Find the number of quarters in the remaining amount // Find the number of dimes in the remaining amount // Find the number of nickels in the remaining amount // Find the number of pennies in the remaining amount // Display results printf("Your amount %f consists of %d dollars %d quarters %d dimes %d nickels %d pennies ", amount, numberOfOneDollars, numberOfQuarters, numberOfDimes, numberOfNickels, numberOfPennies); return 0; } /* Enter an amount in double, for example 11.56:: 32.69 Your amount 32.690000 consists of 32 dollars 2 quarters 1 dimes 1 nickels 4 pennies */ 

C Code!!

not C++ or jave

thank you so much

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!