-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
47 lines (38 loc) · 897 Bytes
/
main.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
#include <iostream>
#include <cstdlib>
#include <ctime>
#include "include/randBase.hpp"
#include "include/randString.hpp"
#include "include/powerBall.hpp"
#include "include/megaMillions.hpp"
int main()
{
char repeat;
randBase *base;
base = new megaMillions();
do
{
int choice;
cout << "\nChoose from the list:\n";
cout << "1. A random string\n";
cout << "2. PowerBall numbers\n";
cout << "3. MegaMillions numbers\n";
cin >> choice;
switch(choice)
{
case 1:
base = new randString();
break;
case 2:
base = new powerBall();
break;
case 3:
base = new megaMillions();
break;
}
base->run();
cout << endl << endl << "Run program again? ";
cin >> repeat;
} while (repeat == 'y' || repeat == 'Y');
return 0;
}