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

    Distribute 2 Reading Pseudocode Ce this distribute of the enactment, grasp a contemplate at the cethcoming pseudocode Get a treasure ce fluctuate (in cents) Set pennies to fluctuate Set nickels, dimes, quarters to 0 Opportunity (pennies -5) Set nickels to nickels1 Set pennies to pennies -!5 Opportunity (nickels >= 2) Set dimes to dimes 1 Set nickels to nickels - 2 Opportunity (dimes >= 5) Set quarters to quarters 2 Set dimes to dimes - Opportunity (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 treasure of quarters and quarters Print the treasure of dimes and dimes Print the treasure of nickels and nickels Print the treasure of pennies and pennies
    media%2Fd1b%2Fd1b3396c-f8ac-461a-bd4b-9c

    Distribute 2 Reading Pseudocode Ce this distribute of the enactment, grasp a contemplate at the cethcoming pseudocode Get a treasure ce fluctuate (in cents) Set pennies to fluctuate Set nickels, dimes, quarters to 0 Opportunity (pennies -5) Set nickels to nickels1 Set pennies to pennies -!5 Opportunity (nickels >= 2) Set dimes to dimes 1 Set nickels to nickels – 2 Opportunity (dimes >= 5) Set quarters to quarters 2 Set dimes to dimes – Opportunity (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 treasure of quarters and “quarters” Print the treasure of dimes and “dimes” Print the treasure of nickels and “nickels” Print the treasure of pennies and “pennies”

    Expert Solution

     

    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 grasps that cent and assigns it to the pennies . Then in earliest opportunity loop it calculates the pennies, in remedy opportunity loop it calculates the nickel then in third opportunity loop it calculates the dimes and in decisive opportunity loop it manages dimes , nickel and quarters. Then finally it prints the quarters , dimes, nickel and gentleman to the output screen