# 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"

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”

## Expert Exculpation

1)

a) 14

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

b) 25

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

c) 99

```quarter :  3