include iostream void dotaskone void dotaskmany int which int main boo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include<iostream.h>
void dotaskone();
void dotaskmany(int which);
int main(){
bool exit=false;
while(true)
{
int choice=menu();
switch(choice)
{
case(1):
dotaskone();
break;
case(2):
dotaskmany(2);
break;
case(3):
dotaskmany(3);
break;
case(4):
continue;
break;
case(5);
exit=true;
break;
default:
cout<<" PLEASE SELECT again!ee\n";
break;
}
if(exit)break;
}
return 0;
}
int menu()
{
int choise;
cout<<"****Menu****\n\n";
cout<<"(1)choise one.\n";
cout<<"(2)choise two.\n";
cout<<"(3)choise there.\n";
cout<<"(4)redisplay menu.\n";
cout<<"(5)Quit.\n\n";
cout<<":";
cin>>choice;
return choice;
}
void dotaskone()
{
cout<<"task one\n";
}
void dotaskmany(int which)
{
if(which==2){
cout<<"task two\n";
}
else{
cout<<"task theree\n";
}
}