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;
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment