-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
77 lines (63 loc) · 1.77 KB
/
Copy pathmain.cpp
File metadata and controls
77 lines (63 loc) · 1.77 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
#include "numbergame.h"
#include "wordgame.h"
using namespace std;
int main ()
{
char back;
srand (time(0));
int choice;
do
{
do
{
cout<<"--------------Main Menu--------------"<<endl;
cout<<" "<<endl;
cout<<"1. Guess the number. "<<endl;
cout<<"2. Guess the word."<<endl;
cout<<"3. About the game."<<endl;
cout<<"4. Quit."<<endl;
cout<<"Enter your choice : "<<endl;
cin>>choice;
}
while (choice < 1 || choice > 4);
switch (choice)
{
case 1:
guessnumber();
break;
case 2 :
guessword();
break;
case 3 :
while ( back != 'b' && back != 'B' )
{
cout<<"Hello!!"<<endl;
cout<<"This is my first mini game project."<<endl;
cout<<"for now you can play: "<<endl;
cout<<"-Guess the number."<<endl;
cout<<"-Guess the word."<<endl;
cout<<"\n I will be adding the updates. "<<endl;
cout<<"\n";
cout<<"\n";
cout<<"\n";
cout<<"\n";
cout<<"\n";
cout<<"for any feed back you can connect with me at :"<<endl;
cout<<"gmail: vasaiyashashank@gmail.com"<<endl;
cout<<"\nPress 'b' or 'B' to go back to main menu.";
cin>>back;
}
case 4 :
cout<<"Exiting............."<<endl;
break;
default:
cout<<"Invalid"<<endl;
break;
}
} while (choice != 4);
return 0;
}