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


Write a program that uses while loops to perform the following steps:              
  1. Prompt the user to input two integers: firstNum and secondNum (firstNum must be less than secondNum).
  2. Output all odd numbers between firstNum and secondNum.
  3. Output the sum of all even numbers between firstNum and secondNum.
  4. Output the numbers and their squares between 1 and 10.
Solution:

No comments:

Post a Comment