Question: alter the example so that it Add 1 to i. return 0; EXERCISES Exercise 2.2.1. Write a program to print all the numbers from nl

alter the example so that it
 alter the example so that it Add 1 to i. return

Add 1 to i. return 0; EXERCISES Exercise 2.2.1. Write a program to print all the numbers from nl to n2, where and n2 are two numbers specified by the user. (Hint: You'l need to romnt fo two values nl and n2; then, initialize i to nl and use n2 in the loop condition Exercise 2.2.2. Alter the example so that it prints all the numbers from n to lin reverse order, as in 5 432 1. (Hint: To decrement a value inside the loop, usethe statement "i = i-1;") Exercise 2.2.3. Alter the example so that it prints only even numbers, as in 0, 2,4 Hint: One of the things you'll need to do is initialize i to 0.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!