0
What is manipulator
6 Answers
+ 1
thanks
0
basic :
<< insertion
>> extraction
0
also tell me what is menu driven program and how can we write them
0
Menu Driven : a choice or option that user can choose during running program / code.
let's say a Calculator , or other which asking user to give input what to do instead of just value.
0
tell me plz about coding of menu driven program
0
I can't make a big one , just sample :
float a,b;
int opt;
......................
cout << "Number 1 : ";
cin >> a;
cout << endl;
cout << "Number 2 : ";
cin >> b;
cout << endl;
cout << "MENU" << endl;
cout << "1: Add " << endl;
cout << "2: Subtract" << endl;
cout << "3: Multiply " << endl;
cout << "4: Divide " << endl;
out << "Enter your choice :";
cin >> opt;
cout << endl;
cout << endl;
switch (opt){
case 1 :
cout << ( a + b );
break;
case 2 :
cout << ( a - b );
break;
case 3 :
cout << ( a * b );
break;
case 4 :
cout << ( a / b );
break;
default :
cout << "Number not in Menu.";
}