Loop Demonstrations

While Loop

This loop prompts the user for a number between 1 and 10. It continues to prompt until a valid input is provided.

Number Input Loop

This loop asks for numbers until a non-number is entered. It then displays the count, total, and average of the numbers entered.

Do-While Loop

This loop displays all even numbers from 1 to 24.

Color Loop

Display the shades of the selected color.