-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinalproject.cpp
762 lines (661 loc) · 24.8 KB
/
finalproject.cpp
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <string>
#include <cmath>
#include <stdio.h>
using namespace std;
int answer1, answer2, answer3, answer4, answer5, answer6, answer7, answer8, answer9, answer10, score1, score2, score3;
string playerName, player1, player2, player3;
char A, B, C, D, subjectChoice,T, F, answerchoice1,answerchoice2, answerchoice3, answerchoice4, answerchoice5, answerchoice6, answerchoice7, answerchoice8, answerchoice9, answerchoice10, choice;
void showWelcome()
{
cout << "Welcome to Geek O Pedia!\n";
cout << endl << "Enter Your name : ";
cin >> playerName;
}
int showMenu()
{
cout << endl << endl;
cout << "This is the main menu\n"<<
"1. Play\n" <<
"2. How to play\n" <<
"3. Top scores\n" <<
"4. Quit\n" <<
"\n" <<
"Enter your choice (1-4): ";
cin >> choice;
return choice;
}
void play()
{
cout << "You chose to play! Please choose which subject do you want:\n"<<
"1. Math\n" <<
"2. Physics\n" <<
"3. Chemistry\n" <<
"Enter your choice (1-3): ";
cin >> subjectChoice;
switch (subjectChoice)
{
case '1': //MATH
//QUESTION 1
cout << "\n";
cout << "1. In the expression 432xy + 124xy, the “432” is called the:\n"<<
"A. multiplier\n"<<
"B. coefficient\n" <<
"C. matrix\n" <<
"D. prime\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice1;
answerchoice1 = toupper(answerchoice1);
if (answerchoice1 == 'B')
{
cout << "\n Correct! You gain 10 points! \n";
answer1 = 10;
}
else
{
cout << "\n The answer is incorrect.\n";
answer1 = 0;
}
//QUESTION 2
cout << "2. What is the quotient of 4 and 4?\n"<<
"A. 8\n"<<
"B. 16\n" <<
"C. 0\n" <<
"D. 1\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice2;
answerchoice2 = toupper(answerchoice2);
if (answerchoice2 == 'D'){
cout << "\n Correct! You gain 10 points! \n";
answer2 = 10;
}
else{
cout << "\n The answer is incorrect.\n";
answer2 = 0;
}
//QUESTION 3
cout << "3. What is three fifth of 100?\n" <<
"A. 3\n" <<
"B. 5\n" <<
"C. 20\n" <<
"D. 60\n" <<
"Enter your choice (A-D): ";
cin >> answerchoice3;
answerchoice3 = toupper(answerchoice3);
if (answerchoice3 == 'D'){
cout << "Correct! You gain 10 points!\n";
answer3 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer3 = 0;
}
//QUESTION 4
cout << "4. In a century how many months are there?\n" <<
"A. 12\n"<<
"B. 120\n"<<
"C. 1200\n"<<
"D. 12000\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice4;
answerchoice4 = toupper(answerchoice4);
if (answerchoice4 == 'C'){
cout << "Correct! You gain 10 points!\n";
answer4 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer4 = 0;
}
//QUESTION 5
cout << "5. What is the reciprocal of 17/15?\n"<<
"A. 1.13\n"<<
"B. 15/17\n"<<
"C. 17/15\n"<<
"D. 30/34\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice5;
answerchoice5 = toupper(answerchoice5);
if (answerchoice5 == 'C'){
cout << "Correct! You gain 10 points!\n";
answer5 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer5 = 0;
}
//QUESTION 6
cout << "6. What is the value of x if x^2 = 169\n"<<
"A. 1\n"<<
"B. 13\n"<<
"C. 169\n"<<
"D. 338\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice6;
answerchoice6 = toupper(answerchoice6);
if (answerchoice6 == 'B'){
cout << "Correct! You gain 10 points!\n";
answer6 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer6 = 0;
}
//QUESTION 7
cout << "7. What is the square of 15?\n"<<
"A. 15\n"<<
"B. 30\n"<<
"C. 252\n"<<
"D. 225\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice7;
answerchoice7 = toupper(answerchoice7);
if (answerchoice7 == 'B'){
cout << "Correct! You gain 10 points!\n";
answer7 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer7 = 0;
}
//QUESTION 8
cout << "8. How many years are there in a decade?\n"<<
"A. 5\n"<<
"B. 10\n"<<
"C. 15\n"<<
"D. 20\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice8;
answerchoice8 = toupper(answerchoice8);
if (answerchoice8 == 'D'){
cout << "Correct! You gain 10 points!\n";
answer8 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer8 = 0;
}
//QUESTION 9
cout << "9. I am a number. I have 7 in the ones place. I am less than 80 but greater than 70. What is my number?\n"<<
"A. 71\n"<<
"B. 73\n" <<
"C. 75\n" <<
"D. 77\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice9;
answerchoice9 = toupper(answerchoice9);
if (answerchoice9 == 'D'){
cout << "Correct! You gain 10 points!\n";
answer9 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer9 = 0;
}
//QUESTION 10
cout << "10. What is 7% equal to?\n"<<
"A. 0.007\n" <<
"B. 0.07\n" <<
"C. 0.7\n" <<
"D. 7\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice10;
answerchoice10 = toupper(answerchoice10);
if (answerchoice10 == 'D'){
cout << "Correct! You gain 10 points!\n";
answer10 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer10 = 0;
}
break;
case '2': //PHYSICS
//Q1
cout << "1. In an object is not moving, no forces are acting upon it: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice1;
answerchoice1 = toupper(answerchoice1);
if (answerchoice1 == 'F'){
cout << "Correct! You gain 10 points!\n";
answer1 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer1 = 0;
}
//Q2
cout << "2. Mass and weight are the same:: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice2;
answerchoice2 = toupper(answerchoice2);
if (answerchoice2 == 'F'){
cout << "Correct! You gain 10 points!\n";
answer2 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer2 = 0;
}
//Q3
cout << "3. Friction is a force that opposes motion: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice3;
answerchoice3 = toupper(answerchoice3);
if (answerchoice3 == 'T'){
cout << "Correct! You gain 10 points!\n";
answer3 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer3 = 0;
}
//Q4
cout << "4. Inertia is a vector quantity. It has both magnitude and direction: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice4;
answerchoice4 = toupper(answerchoice4);
if (answerchoice4 == 'F'){
cout << "Correct! You gain 10 points!\n";
answer4 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer4 = 0;
}
//Q5
cout << "5. The amount of matter in a chemical reaction changes: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice5;
answerchoice5 = toupper(answerchoice5);
if (answerchoice5 == 'F'){
cout << "Correct! You gain 10 points!\n";
answer5 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer5 = 0;
}
//Q6
cout << "6. A nonpolar bond is formed when two atoms share electrons unequally: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice6;
answerchoice6 = toupper(answerchoice6);
if (answerchoice6 == 'F'){
cout << "Correct! You gain 10 points!\n";
answer6 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer6 = 0;
}
//Q7
cout << "7. A low melting point is one property of molecular compund: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice7;
answerchoice7 = toupper(answerchoice7);
if (answerchoice7 == 'T'){
cout << "Correct! You gain 10 points!\n";
answer7 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer7 = 0;
}
//Q8
cout << "8. When electrons are transferred between two atoms, a covalent bond is formed: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice8;
answerchoice8 = toupper(answerchoice8);
if (answerchoice8 == 'F'){
cout << "Correct! You gain 10 points!\n";
answer8 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer8 = 0;
}
//Q9
cout << "9. Orderly crystal shapes, high melting points, and electrical conductivity when dissolved in water are properties of ionic compounds: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice9;
answerchoice9 = toupper(answerchoice9);
if (answerchoice9 == 'T'){
cout << "Correct! You gain 10 points!\n";
answer9 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer9 = 0;
}
//Q10
cout << "10. The properties of solids can be explained by the structure of and the bonding among the metal atoms: True or False?\n"<<
"Enter your choice (T or F?): ";
cin >> answerchoice10;
answerchoice10 = toupper(answerchoice10);
if (answerchoice10 == 'T'){
cout << "Correct! You gain 10 points!\n";
answer10 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer10 = 0;
}
break;
case '3': //CHEMISTRY
//Q1
cout << "1. Brass gets discoloured in air because of the presence of which of the following gases in air\n?"<<
"A. Oxygen\n"<<
"B. Hydrogen sulphide\n"<<
"C. Carbon dioxide\n"<<
"D. Nitrogen\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice1;
answerchoice1 = toupper(answerchoice1);
if (answerchoice1 == 'B'){
cout << "Correct! You gain 10 points!\n";
answer1 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer1 = 0;
}
//Q2
cout << "2. Which of the following is a non metal that remains liquid at room temperature?\n"<<
"A. Phosphorous\n"<<
"B. Bromine\n"<<
"C. Chlorine\n"
"D. Helium\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice2;
answerchoice2 = toupper(answerchoice2);
if (answerchoice2 == 'B'){
cout << "Correct! You gain 10 points!\n";
answer2 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer2 = 0;
}
//Q3
cout << "3. Chlorophyll is a naturally occurring chelate compound in which central metal is\n:"<<
"A. copper\n"<<
"B. magnesium\n"<<
"C. iron\n"<<
"D. calcium\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice3;
answerchoice3 = toupper(answerchoice3);
if (answerchoice3 == 'D'){
cout << "Correct! You gain 10 points!\n";
answer3 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer3 = 0;
}
//Q4
cout << "4. Which of the following is used in pencils?\n"<<
"A. Graphite\n"<<
"B. Silicon\n"<<
"C. Charcoal\n"<<
"D. Phosphorous\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice4;
answerchoice4 = toupper(answerchoice4);
if (answerchoice4 == 'A'){
cout << "Correct! You gain 10 points!\n";
answer4 = 10;
}
else
{
cout << "The answer is incorrect.\n";
answer4 = 0;
}
//Q5
cout << "5. Which metal pollute the air of a big city?\n"<<
"A. Copper\n"<<
"B. Chromium\n"<<
"C. Lead\n"<<
"D. Cadmium\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice5;
answerchoice5 = toupper(answerchoice5);
if (answerchoice5 == 'C'){
cout << "Correct! You gain 10 points!\n";
answer5 = 10;
}
else
{
cout << "The answer is incorrect.\n";
answer5 = 0;
}
//Q6
cout << "6. Bell metal is an alloy of:\n"<<
"A. nickel and copper\n"<<
"B. zinc and copper\n"<<
"C. brass and nickel\n"<<
"D. tin and copper\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice6;
answerchoice6 = toupper(answerchoice6);
if (answerchoice6 == 'D'){
cout << "Correct! You gain 10 points!\n";
answer6 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer6 = 0;
}
//Q7
cout << "7. The nucleus of an atom consists of:\n"<<
"A. electrons and neutrons\n"<<
"B. electrons and protons\n"<<
"C. protons and neutrons\n"<<
"D. All of the above\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice7;
answerchoice7 = toupper(answerchoice7);
if (answerchoice7 == 'C'){
cout << "Correct! You gain 10 points!\n";
answer7 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer7 = 0;
}
//Q8
cout << "8. The most electronegative element among the following is:\n"<<
"A. sodium\n"<<
"B. bromine\n"<<
"C. fluorine\n"<<
"D. oxygen\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice8;
answerchoice8 = toupper(answerchoice8);
if (answerchoice8 == 'C'){
cout << "Correct! You gain 10 points!\n";
answer8 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer8 = 0;
}
//Q9
cout << "9. The metal used to recover copper from a solution of copper sulphate is: \n"<<
"A. Na\n"<<
"B. Ag\n"<<
"C. Hg\n"<<
"D. Fe\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice9;
answerchoice9 = toupper(answerchoice9);
if (answerchoice9 == 'D')
{
cout << "Correct! You gain 10 points!\n";
answer9 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer9 = 0;
}
//Q10
cout << "10. The most abundant rare gas in the atmosphere is: \n"<<
"A. He\n"<<
"B. Ne\n"<<
"C. Ar\n"<<
"D. Xe\n"<<
"Enter your choice (A-D): ";
cin >> answerchoice10;
answerchoice10 = toupper(answerchoice10);
if (answerchoice10 == 'C')
{
cout << "Correct! You gain 10 points!\n";
answer10 = 10;
}
else{
cout << "The answer is incorrect.\n";
answer10 = 0;
}
break;
default: //INVALID CHOICE
cout<< "\n\n The choice you entered is not valid\n\n";
exit(0);
break;
}
//CALCULATING RESULTS
int total [] = {answer1, answer2, answer3, answer4, answer5, answer6, answer7,answer8,answer9, answer10};
int n, result=0;
for ( n=0 ; n<10 ; n++ )
{
result += total[n];
}
cout << "Your result is:" << result << endl;
if (result >= 70)
{
cout << " ,ad8888ba, ,ad8888ba, 888b 88 ,ad8888ba, 88888888ba db 888888888888 88 88 88 db 88 ,ad8888ba, 888b 88 ad88888ba 88 "<<endl;
cout << " d8\"\' `\"8b d8\"\' `\"8b 8888b 88 d8\"\' `\"8b 88 \"8b d88b 88 88 88 88 d88b 88 d8\"\' `\"8b 8888b 88 d8\" \"8b 88 "<<endl;
cout << "d8\' d8' `8b 88 `8b 88 d8\' 88 ,8P d8\'`8b 88 88 88 88 d8\'`8b 88 d8\' `8b 88 `8b 88 Y8, 88 "<<endl;
cout << "88 88 88 88 `8b 88 88 88aaaaaa8P' d8\' `8b 88 88 88 88 d8\' `8b 88 88 88 88 `8b 88 `Y8aaaaa, 88 "<<endl;
cout << "88 88 88 88 `8b 88 88 88888 88\"\"\"\"88\' d8YaaaaY8b 88 88 88 88 d8YaaaaY8b 88 88 88 88 `8b 88 `\"\"\"\"\"8b, 88 "<<endl;
cout << "Y8, Y8, ,8P 88 `8b 88 Y8, 88 88 `8b d8\"\"\"\"\"\"\"\"8b 88 88 88 88 d8\"\"\"\"\"\"\"\"8b 88 Y8, ,8P 88 `8b 88 `8b \"\" "<<endl;
cout << " Y8a. .a8P Y8a. .a8P 88 `8888 Y8a. .a88 88 `8b d8\' `8b 88 Y8a. .a8P 88 d8\' `8b 88 Y8a. .a8P 88 `8888 Y8a a8P aa "<<endl;
cout << " `\"Y8888Y\"\' `\"Y8888Y\"\' 88 `888 `\"Y88888P\" 88 `8b d8\' `8b 88 `\"Y8888Y\"\' 88888888888 d8\' `8b 88 `\"Y8888Y\"\' 88 `888 \"Y88888P\" 88 "<<endl;
srand(time(0));
int numdig;
char let1, let2, let3;
let1 = rand() % (90 - 65 + 1) + 65;
let2 = rand() % (90 - 65 + 1) + 65;
let3 = rand() % (90 - 65 + 1) + 65;
numdig = rand() % (9999 - 1000 + 1) + 1000;
cout <<"\n\n Don't forget our limited time offer:\n Since you won this quiz, you’ll receive a code that you can use only once for one our games that you need to purchase online.\n" << "Your discount code: "<< let1<<let2<<let3<<numdig<<endl;
}
else
{
cout << "\nSorry! Better luck next time!";
}
if (result > score3)
{
score3 = result;
player3 = playerName;
}
int tempScore;
string tempName;
if (score3 > score2)
{
tempScore = score2;
tempName = player2;
score2 = score3;
player2 = player3;
score3 = tempScore;
player3 = tempName;
}
if (score2 > score1)
{
tempScore = score1;
tempName = player1;
score1 = score2;
player1 = player2;
score2 = tempScore;
player2 = tempName;
}
cout << "\n\n Top Players List\n";
cout << "------------------\n";
cout << "1- " << player1 << "\t" << score1 << endl;
cout << "2- " << player2 << "\t" << score2 << endl;
cout << "3- " << player3 << "\t" << score3 << endl;
ofstream updateTopPlayers;
updateTopPlayers.open("topList.txt");
updateTopPlayers << player1 << endl;
updateTopPlayers << score1 << endl;
updateTopPlayers << player2 << endl;
updateTopPlayers << score2 << endl;
updateTopPlayers << player3 << endl;
updateTopPlayers << score3 << endl;
updateTopPlayers.close();
}
void instructions()
{
cout << "From the title! You can understand that this game is only for the geeks!\n"<<
"Are you a geek? Well let's find out!\n"<<
"The game is simple: You'll be offered 3 geeky subjects\n"<<
"Math, physics and chemistry.\n"<<
"The answers could be multiple choice or true or false.\n"<<
"Just answer correctly and we'll see if you're really a geek or not!\n"<<
"Good luck! You'll need it!\n";
}
void topList ()
{
ifstream topPlayers;
topPlayers.open("topList.txt");
cout << "Top Players List\n";
cout << "------------------\n";
topPlayers >> player1;
topPlayers >> score1;
topPlayers >> player2;
topPlayers >> score2;
topPlayers >> player3;
topPlayers >> score3;
cout << "1- " << player1 << "\t" << score1 << endl;
cout << "2- " << player2 << "\t" << score2 << endl;
cout << "3- " << player3 << "\t" << score3 << endl;
topPlayers.close();
}
int main()
{
showWelcome();
showMenu();
switch (choice)
{
case '1':
play();
break;
case '2':
instructions();
cout<< "Press ENTER to go back to the main menu\n\n";
cin.get();
getchar();
main();
break;
case '3':
topList();
cout<< "Press ENTER to go back to the main menu\n\n";
cin.get();
getchar();
main();
break;
case '4':
exit(0);
default:
cout << "Please enter a valid menu choice\n";
cout<< "Press ENTER to go back to the main menu\n\n";
cin.get();
getchar();
main();
break;
}
return 0;
}