-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrandom.cpp
More file actions
40 lines (34 loc) · 920 Bytes
/
random.cpp
File metadata and controls
40 lines (34 loc) · 920 Bytes
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
#include<iostream>
#include<ctime>
using namespace std;
int main(){
//#random event generator
srand(time(0));
int n = rand();
int random_number = (n % 6) + 1 ;
cout << random_number << endl;
switch(random_number){
case 1 :
cout << "Go for a walk in the park" << endl;
break;
case 2 :
cout << "Watch a movie at home" << endl;
break;
case 3 :
cout << "Plan a weekend getaway" << endl;
break;
case 4 :
cout << "Do a home workout or yoga session" << endl;
break;
case 5 :
cout << "Attend a local concert or event" << endl;
break;
case 6 :
cout << "Call a friend or family member" << endl;
break;
default:
cout << "Go to Rooftop";
break;
}
return 0;
}