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

Part 2 Reading Pseudocode For this part of the assignment, take a look at the fo

ID: 3882900 • Letter: P

Question

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"

Explanation / Answer

In Chegg we have a policy of one question per post, Although i have answered two questions whereas only one answer per post is allowed

1)

a) 14

Your Change is

b) 25

Your Change is

c) 99

Your Change is

2) The pseudocode simply converts the user entered cents into the bills of quarters, dimes, nickel and pennies. The pseudocode promts the user to enter the cents as input then it takes that cent and assigns it to the pennies . Then in first while loop it calculates the pennies, in second while loop it calculates the nickel then in third while loop it calculates the dimes and in last while loop it manages dimes , nickel and quarters. Then finally it prints the quarters , dimes, nickel and penny to the output screen