Control Structures II with C++ programming
Write a program that uses do 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 square between 1 and 10.
5. Output the sum of the square of the odd numbers between firstNum and secondNum.
6. Output all uppercase letters.
https://brainmass.com/computer-science/control-structures/control-structures-ii-c-plus-plus-programming-32598
Solution Preview
Please see attached and below.
#include<iostream.h>
void main( )
{
int firstnum;
int secondnum;
int sum=0;
char letter[26]={'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'};
do{
cout<< "Please enter the first number : ";
cin>> firstnum;
cout<< "Please enter the second number : ";
cin>> ...
Solution Summary
Control Structures II with C++ programming are featured.