i'm kind of new in C++. now is that,i'm in real need of any help to solve this question:
Write a program that uses loop to perform the following steps :
a. Prompt the user to input two integers: firstNum and secondNum (firstNum must be less than secondNum)
b. Output all odd numbers between firstNum and secondNum.
c. Output the sum of all even numbers between firstNum and secondNum.
d. Output the numbers and their squares between 1 and 10.
e. Output the sum of the square of the odd numbers between firstNum and secondNum.
f. Output all uppercase letters.
can neone,kindly write the entire prog..
my brain got crammed in the middle of the coding. Please,neone,help me!!
The task description already says what you should do.
If you managed to do b., then what's your problem with c.? Don't you know what a sum is (Google helps here) or don't you know yet about operators + and +=?
actually i merely escape at b. and e. .....emm,what does it seem like?emm..EntirE!haha..just kidding,but it really happen..the first statement.just please help me some more.thanx.
That typing style of yours may be faster to type for yourself, but it makes it very hard for others to read. It's not that hard to spend 10 more seconds.
Athar, I strongly object to your last statement to the point that you'd get hit over the head, hard, with a dead albatross (not chicken) if I were nearby.
That said, I will (like most members here) not do your work for you. I will however "waste some of my time" and give you two links that might help you out somewhat, depending on how you use them.
He has made it quite obvious that he has zero interest in doing any work himself.
At the beginning he might somehow manage to get through the course by scraping tidbits of code together that he manages to squeeze out of people, but obviously that will no longer work once the assignments get more complex.
int main()
{
int firstNum, secondNum;
int sumEvenNum = 0;
int sumSquareOddNum = 0;
char chCounter;
int counter;
cout << "name" << endl;
//Part a
cout << "Enter two numbers." << endl;
cout << "First number must be less than ";
cout << "the second number you enter" << endl;
cout << "Enter numbers: " << flush;
cin >> firstNum >> secondNum;
cout << endl;
//Part b
if (firstNum % 2 == 0)
counter = firstNum + 1;
else
counter = firstNum;
cout << "Odd integers between " << firstNum << " and "
<< secondNum << " are: " << endl;