Set to quarters change / 25 Set to change change mod 25 Set to dimes change / 10 Set to change change mod 10 Set to nickels change / 5 Set to pennies change mod 5 Print change is” “Your the value of and quarters “quarters” the value of and dimes “dimes” Print the value of and nickels “nickels” Print the value of and pennies “pennies” Get a value for (in cents) change Get a value for in machine quarters Get a value for in machine dimes Get a value for in machine nickels Get a value for in machine pennies While (change >= 25 and > 0) quarters Set to - 1 quarters quarters Set to - 25 change change While (change >= 10 and > 0) dimes Set to - 1 dimes dimes Set to - 10 change change While (change >= 5 and > 0) nickels Set to - 1 nickels nickels Set to - 5 change change If (pennies >= Then change) Print is enough money to make change” “There Else Print is not enough money to make change” “There
Set quarters to change / 25 Set change to change mod 25 Set dimes to change / 10 Set change to change mod 10 Set nickels to change / 5 Set pennies to change mod 5 Print “Your change is” the value of quarters and “quarters” the value of dimes and “dimes” Print the value of nickels and “nickels” Print the value of pennies and “pennies” Get a value for change (in cents) Get a value for quarters in machine Get a value for dimes in machine Get a value for nickels in machine Get a value for pennies in machine While (change >= 25 and quarters > 0) Set quarters to quarters - 1 Set change to change - 25 While (change >= 10 and dimes > 0) Set dimes to dimes - 1 Set change to change - 10 While (change >= 5 and nickels > 0) Set nickels to nickels - 1 Set change to change - 5 If (pennies >= change) Then Print “There is enough money to make change” Else Print “There is not enough money to make change”
Solution-Manual-Invitation-to-Computer-Science-6th-Edition-Schneider.docx