Answer to Question #19782 in C++ for zoya arshi

Question #19782
W.A.P in C++ to display a menu,
1. Print number of odd numbers and even numbers inside a range accepted from the user.
2. print no.of prime numbers within an accepted range.
3. Print this pattern.
****
***
**
*
4. Exit.
1
Expert's answer
2012-11-29T10:18:49-0500
#include<iostream>
#include<string>
using namespace std;

int main ()
{
int choice;
do {
& cout << "1. Print number of odd numbers and even numbers inside a range accepted from the user." << endl;
& cout << "2. Print no.of prime numbers within an accepted range." << endl;
& cout << "3. Print this pattern. \n****\n***\n**\n*" << endl;
& cout << "4. Exit." << endl;
& cin >> choice;
& switch(choice){

& case 1: break;

& case 2 : break;

& case 3 : break;

& case 4 : return 0;

& }
}
while (choice != 4);
system("pause");
return 0;

}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS