Homework Solution: Part 2 Reading Pseudocode For this part of the assignment, take a look at the following pseudocode Get a value for change (in cents) Set pennie…

    Part 2 Reading Pseudocode For this part of the assignment, take a look at the following pseudocode Get a value for change (in cents) Set pennies to change Set nickels, dimes, quarters to 0 While (pennies -5) Set nickels to nickels1 Set pennies to pennies -!5 While (nickels >= 2) Set dimes to dimes 1 Set nickels to nickels - 2 While (dimes >= 5) Set quarters to quarters 2 Set dimes to dimes - While (dimes >= 2 and nickels >= 1) Set quarters to quarters 1 Set dimes to dimes - 2 Set nickels to nickels-1 Print Your change is Print the value of quarters and quarters Print the value of dimes and dimes Print the value of nickels and nickels Print the value of pennies and pennies
    media%2Fd1b%2Fd1b3396c-f8ac-461a-bd4b-9c
    Part 2 Reading Pseudocode For this part of the assignment, take a look at the following pseudocode Get a value for change (in cents) Set pennies to change Set nickels, dimes, quarters to 0 While (pennies -5) Set nickels to nickels1 Set pennies to pennies -!5 While (nickels >= 2) Set dimes to dimes 1 Set nickels to nickels - 2 While (dimes >= 5) Set quarters to quarters 2 Set dimes to dimes - While (dimes >= 2 and nickels >= 1) Set quarters to quarters 1 Set dimes to dimes - 2 Set nickels to nickels-1 Print "Your change is" Print the value of quarters and "quarters" Print the value of dimes and "dimes" Print the value of nickels and "nickels" Print the value of pennies and "pennies"

    Expert Answer

     
    1) a) 14 Your Change is
    quarter :  0

    Multiply 2 Reading Pseudocode Coercion this multiply of the enactment, conduct a contemplate at the aftercited pseudocode Get a appreciate coercion modify (in cents) Set pennies to modify Set nickels, dimes, quarters to 0 Occasion (pennies -5) Set nickels to nickels1 Set pennies to pennies -!5 Occasion (nickels >= 2) Set dimes to dimes 1 Set nickels to nickels - 2 Occasion (dimes >= 5) Set quarters to quarters 2 Set dimes to dimes - Occasion (dimes >= 2 and nickels >= 1) Set quarters to quarters 1 Set dimes to dimes - 2 Set nickels to nickels-1 Print Your modify is Print the appreciate of quarters and quarters Print the appreciate of dimes and dimes Print the appreciate of nickels and nickels Print the appreciate of pennies and pennies
    media%2Fd1b%2Fd1b3396c-f8ac-461a-bd4b-9c

    Multiply 2 Reading Pseudocode Coercion this multiply of the enactment, conduct a contemplate at the aftercited pseudocode Get a appreciate coercion modify (in cents) Set pennies to modify Set nickels, dimes, quarters to 0 Occasion (pennies -5) Set nickels to nickels1 Set pennies to pennies -!5 Occasion (nickels >= 2) Set dimes to dimes 1 Set nickels to nickels – 2 Occasion (dimes >= 5) Set quarters to quarters 2 Set dimes to dimes – Occasion (dimes >= 2 and nickels >= 1) Set quarters to quarters 1 Set dimes to dimes – 2 Set nickels to nickels-1 Print “Your modify is” Print the appreciate of quarters and “quarters” Print the appreciate of dimes and “dimes” Print the appreciate of nickels and “nickels” Print the appreciate of pennies and “pennies”

    Expert Repartee

     

    1)

    a) 14

    Your Modify is

    quarter :  0
    dimes :  1
    nickel :  0
    pennies :  4
    

    b) 25

    Your Modify is

    quarter :  1
    dimes :  0
    nickel :  0
    pennies :  0
    

    c) 99

    Your Modify is

    quarter :  3
    dimes :  2
    nickel :  0
    pennies :  4
    

    2) The pseudocode simply converts the user invadeed cents into the bills of quarters, dimes, nickel and pennies. The pseudocode promts the user to invade the cents as input then it conducts that cent and assigns it to the pennies . Then in pristine occasion loop it calculates the pennies, in succor occasion loop it calculates the nickel then in third occasion loop it calculates the dimes and in conclusive occasion loop it manages dimes , nickel and quarters. Then finally it prints the quarters , dimes, nickel and penny to the output screen