Explore BrainMass

Control Structures II with C++ programming

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

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

#include<iostream.h>

void main( )
{
int firstnum;
int secondnum;
int sum=0;
char letter={'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.

\$2.49