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

software needs the Users initials, a way to keep track of the different coins (D

ID: 3628206 • Letter: S

Question

software needs the Users initials, a way to keep track of the different coins (Dollars, quarter, dimes, nickels and pennies). From the counts of each coin make the largest dollar amount with the least amount of change left over.
Data Requirements
Char first, middle, last
Int dollars
Int quarters
Int dimes
Int nickels
Int pennies
Use this code to get the users initials
scanf("%c%c%c",&first,&middle,&last);

Use this code to print the users initials
printf("Welcome %c%c% ",first,middle,last);

Explanation / Answer

DEAR FRIEND here is the program u want PLEASE RATE #include int main() { char first, middle, last; /* input - 3 initials */ int pennies, nickels; /* input - count of each coin type */ int dimes, quarters; /* input - count of each coin type */ int change; /* output - change amount */ int dollars; /* output - dollar amount */ int total_cents; /* total cents */ /* Get and display the customer's initials. */ printf("Type in 3 initials and press return> "); scanf("%c%c%c", &first, &middle, &last); printf("Hello %c%c%c, let's see what your coins are worth. ", first, middle, last); /* Get the count of each kind of coin. */ printf("Number of quarters> "); scanf("%d", &quarters); printf("Number of dimes > "); scanf("%d", &dimes); printf("Number of nickels > "); scanf("%d", &nickels); printf("Number of pennies > "); scanf("%d", &pennies); /* Compute the total value in cents. */ total_cents = 25 * quarters + 10 * dimes + 5 * nickels + pennies; /* Find the value in dollars and change. */ dollars = total_cents / 100; change = total_cents % 100; /* Display the value in dollars and change. */ printf(" Your coins are worth %d dollars and %d cents. ", dollars, change); return (0); }