Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

x.Hmg PuTTy to compile the program Write a program that will determine the chang

ID: 3616774 • Letter: X

Question

x.Hmg PuTTy to compile the program
Write a program that will determine the change due for a purchase paid for with a $20 bill. Prompt user to enter purchase amount. Enter amount as dollars and cents. Must be greater than zero. Must be less than or equal to 20.00

Program outputs amount of change due. Then outputs number of coins and bills of each denomination to be returned as change. Give back the maximum number of each denomination of bill and coin Largest to smallest $10, $5, $1, Quarters, Dimes, Nickles, Pennies nDon’t output zero amounts. A $20 purchase is a special case.
Get purchase amount in dollars and cents as a floating point number. If input is valid, output the purchase amount as dollars and cents. Format output as shown in sample runs. Return 0 on successful run. Return 1 in case of error.

Write a program that will determine the change due for a purchase paid for with a $20 bill. Prompt user to enter purchase amount. Enter amount as dollars and cents. Must be greater than zero. Must be less than or equal to 20.00

Program outputs amount of change due. Then outputs number of coins and bills of each denomination to be returned as change. Give back the maximum number of each denomination of bill and coin Largest to smallest $10, $5, $1, Quarters, Dimes, Nickles, Pennies nDon’t output zero amounts. A $20 purchase is a special case.
Get purchase amount in dollars and cents as a floating point number. If input is valid, output the purchase amount as dollars and cents. Format output as shown in sample runs. Return 0 on successful run. Return 1 in case of error.
Write a program that will determine the change due for a purchase paid for with a $20 bill. Prompt user to enter purchase amount. Enter amount as dollars and cents. Must be greater than zero. Must be less than or equal to 20.00

Program outputs amount of change due. Then outputs number of coins and bills of each denomination to be returned as change. Give back the maximum number of each denomination of bill and coin Largest to smallest $10, $5, $1, Quarters, Dimes, Nickles, Pennies nDon’t output zero amounts. A $20 purchase is a special case.
Get purchase amount in dollars and cents as a floating point number. If input is valid, output the purchase amount as dollars and cents. Format output as shown in sample runs. Return 0 on successful run. Return 1 in case of error.
Program outputs amount of change due. Then outputs number of coins and bills of each denomination to be returned as change. Give back the maximum number of each denomination of bill and coin Largest to smallest $10, $5, $1, Quarters, Dimes, Nickles, Pennies nDon’t output zero amounts. A $20 purchase is a special case.
Get purchase amount in dollars and cents as a floating point number. If input is valid, output the purchase amount as dollars and cents. Format output as shown in sample runs. Return 0 on successful run. Return 1 in case of error.
If input is valid, output the purchase amount as dollars and cents. Format output as shown in sample runs. Return 0 on successful run. Return 1 in case of error.

Explanation / Answer

please rate - thanks sorry about that #include int main() { intden;                                                double amount; int amt; printf("Enter amount of purchase: "); scanf ("%lf", &amount); if(amount>20||amount0)    printf("$10.00 %d ",den);                       den=amt/500; amt%=500; if(den>0)    printf("$5.00 %d ",den);                      den=amt/100; amt%=100; if(den>0)    printf("$1.00%d ",den);                    den=amt/25; amt%=25; if(den>0)    printf("Quarters %d ", den);              den=amt/10; amt%=10; if(den>0)    printf ("Dimes %d ",den);              den=amt/5; amt%=5; if(den>0) printf ("Nickels %d ",den);             if(amt>0) printf("Pennies%d ",amt);               return 0; }