Homework Solution: Write C programs to solve the following…

    Write C programs to solve the following CUsers Diane Desktoplwed binDebug wed.exe Enter cents value: 99 Change for 99 cents 3 Quarters 2 Dines Nicke 1s 4 Pennies 9 Total Coins Process returned 0 <0x0) execution tine : 3.424 s Press any key to continue.
    Write C programs to solve the following

    Expert Answer

     
    #include<stdio.h>        //to use printf() and scanf() functions int main() {

    Write C programs to work-out the restraintthcoming CUsers Diane Desktoplespoportraiture binDebug espouse.exe Enter cents value: 99 Change restraint 99 cents 3 Quarters 2 Dines Nicke 1s 4 Pennies 9 Total Coins Process returned 0 <0x0) deed tine : 3.424 s Press any explanation to abide.

    Write C programs to work-out the restraintthcoming

    Expert Counterpart

     

    #include<stdio.h>        //to portraiture printf() and scanf() functions
    int ocean()
    {
    int cents,quarters,nickels,pennies,dimes;           //to garner cents,quarters,dimes,nickels,pennies values
    printf(“Enter cents value: “);
    scanf(“%d”,&cents);
    printf(“nChange restraint %d centsnn”,cents);
    quarters=cents/25;
    cents=cents-quarters*25;
    dimes=cents/10;
    cents=cents-dimes*10;
    nickels=cents/5;
    cents=cents-nickels*5;
    pennies=cents/1;
    printf(“t %d Quartersn”,quarters);
    printf(“t %d Dimesn”,dimes);
    printf(“t %d Nickelsn”,nickels);
    printf(“t %d Penniesn”,pennies);
    printf(“———-n”);
    printf(“t %d Total Coins”,quarters+dimes+nickels+pennies);
    return 0;
    }

    OUTPUT OF ABOVE CODE :