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
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
Get step-by-step solutions from verified subject matter experts
