To solve this problem, you can use the following visual logic steps:
1. Start
2. Declare variables for quarters, dimes, nickels, and pennies and set their initial values to 0.
3. Ask the user to enter a whole number less than 100 and store it in a variable called "N".
4. If N is greater than or equal to 25:
- Set the value of the quarters variable to N divided by 25.
- Update the value of N by subtracting the product of quarters and 25.
5. If N is greater than or equal to 10:
- Set the value of the dimes variable to N divided by 10.
- Update the value of N by subtracting the product of dimes and 10.
6. If N is greater than or equal to 5:
- Set the value of the nickels variable to N divided by 5.
- Update the value of N by subtracting the product of nickels and 5.
7. Set the value of the pennies variable to N.
8. Display the number of each coin that makes up N cents:
- Display "Quarters: " followed by the value of the quarters variable.
- Display "Dimes: " followed by the value of the dimes variable.
- Display "Nickels: " followed by the value of the nickels variable.
- Display "Pennies: " followed by the value of the pennies variable.
9. End
Here is the visual logic program that represents the steps described above:
```
START
|
|
QUARTERS=0 |
DIMES=0 |
NICKELS=0 |
PENNIES=0 |
|
|
INPUT N |
|
IF N>=25 |
| |
|(1) QUARTERS= N/25 |
|(2) N = N – QUARTERS*25 |
|
IF N>=10 |
| |
|(3) DIMES = N/10 |
|(4) N = N – DIMES*10 |
|
IF N>=5 |
| |
|(5) NICKELS = N/5 |
|(6) N = N – NICKELS*5 |
PRESENT RESULTS |
| |
|(7) PENNIES = N |
|(8) Display "Quarters:" + QUARTERS |
|(9) Display "Dimes:" + DIMES |
|(10) Display "Nickels:" + NICKELS |
|(11) Display "Pennies:" + PENNIES |
END |
```
This visual logic program takes the user input, divides it by the value of each coin, and subtracts the product from N. It continues this process until all the coins that make up N cents are determined. Finally, it displays the number of quarters, dimes, nickels, and pennies required to make up the given number of cents.