Search for question
Question

Exercise 1) Write a program to read one integer and display the numbers from 0 to the input

value.

The following are two test cases. The program starts to display the question, "Type one integer

here.", then reads the user input such as 10 below. Once the user types Enter key, then the

program displays the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 as shown below. Test different

input to check if your program works correctly or not. The second is the case when the input is

5.

Type one integer here.

10

0 1 2 3 4 5 6 7 8 9 10

Type one integer here.

5

0 1 2 3 4 5

Fig: 1