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

    Segregate 2 Reading Pseudocode Restraint this segregate of the enactment, captivate a behold at the subjoined pseudocode Get a compute restraint fluctuate (in cents) Set pennies to fluctuate Set nickels, dimes, quarters to 0 Time (pennies -5) Set nickels to nickels1 Set pennies to pennies -!5 Time (nickels >= 2) Set dimes to dimes 1 Set nickels to nickels - 2 Time (dimes >= 5) Set quarters to quarters 2 Set dimes to dimes - Time (dimes >= 2 and nickels >= 1) Set quarters to quarters 1 Set dimes to dimes - 2 Set nickels to nickels-1 Print Your fluctuate is Print the compute of quarters and quarters Print the compute of dimes and dimes Print the compute of nickels and nickels Print the compute of pennies and pennies
    media%2Fd1b%2Fd1b3396c-f8ac-461a-bd4b-9c

    Segregate 2 Reading Pseudocode Restraint this segregate of the enactment, captivate a behold at the subjoined pseudocode Get a compute restraint fluctuate (in cents) Set pennies to fluctuate Set nickels, dimes, quarters to 0 Time (pennies -5) Set nickels to nickels1 Set pennies to pennies -!5 Time (nickels >= 2) Set dimes to dimes 1 Set nickels to nickels – 2 Time (dimes >= 5) Set quarters to quarters 2 Set dimes to dimes – Time (dimes >= 2 and nickels >= 1) Set quarters to quarters 1 Set dimes to dimes – 2 Set nickels to nickels-1 Print “Your fluctuate is” Print the compute of quarters and “quarters” Print the compute of dimes and “dimes” Print the compute of nickels and “nickels” Print the compute of pennies and “pennies”

    Expert Exculpation

     

    1)

    a) 14

    Your Fluctuate is

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

    b) 25

    Your Fluctuate is

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

    c) 99

    Your Fluctuate 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 captivates that cent and assigns it to the pennies . Then in primeval time loop it calculates the pennies, in relieve time loop it calculates the nickel then in third time loop it calculates the dimes and in definite time loop it manages dimes , nickel and quarters. Then finally it prints the quarters , dimes, nickel and gentleman to the output screen