Question: I need help on this question. I don't know how to use while loops. Can you help me by teaching me what they are and

I need help on this question. I don't know how to use while loops. Can you help me by teaching me what they are and how to use them? thank you. I need help on this question. I don't know how to

Part A. Write a program WhileLoops that uses while loops to perform the following steps 1. Prompt the user to input two positive integers: firstNum and secondNum (firstNum must be smaller than secondNum). 2. Output all the even numbers between firstNum and secondNum inclusive 3. Output the sum of all the even numbers between firstNum and secondNum inclusive. 4. Output all the odd numbers between firstNum and secondNum inclusive. 5. Output the sum of all the odd numbers between firstNum and secondNum inclusive. EXAMPLE OUTPUT: Enter an integer: Enter another integer larger than the first one 10 Even numbers 4 6 8 10 Sum of even numbers 28 Odd numbers 3 5 7 9 sum of odd numbers F 24

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!