Purchase Solution

Control Structures II with C++ programming

Not what you're looking for?

Ask Custom Question

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.

Purchase this Solution

Solution Summary

Control Structures II with C++ programming are featured.

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>> ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

C# variables and classes

This quiz contains questions about C# classes and variables.