Question: Instructions Write a program that uses for loops to perform the following steps: Prompt the user to input two integers: firstNum and secondNum (firstNum must

Instructions

Write a program that uses for 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.
    • Separate the numbers using any amount of spaces.
  5. Output the sum of the square of the odd numbers between firstNum and secondNum.
  6. Output all uppercase letters.

#include

using namespace std;

int main() {

// Write your main here

return 0;

}

TEST CASE

Output all odd numbers between firstNum and secondNum case 1

Expected Output

5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35

Output all odd numbers between firstNum and secondNum case 2

Expected Output

987 989 991 993 995 997 999 1001

Output the numbers and their squares between 1 and 10 case 1

Expected Output

1 1 2 4 3 9 4 16 5 25 6 36 7 49 8 64 9 81 10 100

Output the numbers and their squares between 1 and 10 case 2

Expected Output

1 1 2 4 3 9 4 16 5 25 6 36 7 49 8 64 9 81 10 100

Output all uppercase letters case 1

Expected Output

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Output all uppercase letters case 2

Expected Output

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

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!