Question: Write a program that uses For loops to perform the following steps: a. Prompt the user to input two integers: firstNum and second Num.

Write a program that uses For loops to perform the following steps:



Write a program that uses For loops to perform the following steps: a. Prompt the user to input two integers: firstNum and second Num. (firstNum must be less than second Num.) b. Output all the odd numbers between firstNum and second Num inclusive. c. Output the sum of all the even numbers between firstNum and second Num inclusive.

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 Programming Questions!