Question: I need some help with the coding process as I keep getting repeated values and the coding language is rxvt (gedit). This is my coding

 I need some help with the coding process as I keep

I need some help with the coding process as I keep getting repeated values and the coding language is rxvt (gedit).

This is my coding process so far and when I get the input it shows 1 quarters and then one quarter and 1 half dollars and 1 half dollar. The values are repeated in the output both with singular and plural getting repeated values and the coding language is rxvt (gedit). This is

Computer Programming Assignment #2 Modify the Example Assignment to meet the following specifications: 1. Right align output of number of each type of coin entered (up to 3 digits). 2. Prevent the user from entering a negative number of coins. 3. Do not display the coins for which the user entered zero. 4. Change the output to correctly handle singular/plural output. (ex: display 1 penny" instead of 1 pennies") Sample Output: (This is not the testcase to use when submitting for a grade) How many half dollars do you have? You can't have a negative number of coins How many half dollars do you have? -2 You can't have a negative number of coins How many half dollars do you have? How many quarters do you have? How many dimes do you have? - 2 You can't have a negative number of coins How many dimes do you have? How many nickels do you have? How many pennies do you have? You entered the following money: 1 half dollar 3 quarters 7 nickels 9 pennies These 20 coins add up to a total of $1.69 printf(" you entered the following money: "); | if (h>0) printf("%3d half dollars ", h); if (h==1) printf("%3d half dollar ", h); if(q>0) printf("%3d quarters ",q); if (==1) printf("%3d quarter ",q); if(d>) printf("%3d dimes ",d); if(d==1) printf("%3d dime ",d)

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!