@BilalMuakkit/

CanineBestCoordinates

C++

No description

fork
loading
Files
  • main.cpp
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
48
49
50
#include <iostream>
#include <unistd.h>
#include <ctime>
#include <cstdlib>

using namespace std;

int main() 
{
 cout << "Welcome to The Price is Right Showdown Wheel!" << endl;
 sleep(2);
 cout << "Your opponent is spinning" << endl;
 sleep(2);
 //code random event
 srand((int) time(0));
 int computer_spin = (rand() %3) + 1;
 int player_spin = (rand() % 3) + 1;
 //create computer spin
 switch(computer_spin)
 {
   case 1:
   computer_spin = 5;
   break;
   case 2:
   computer_spin = 5;
   break;
   case 3:
   computer_spin = 5;
   break;
 }
 cout << "Your opponent spun " << computer_spin;
 sleep(2);
 cout << "You are spinning..." << endl;
 sleep(2);
 //create player spin
 switch(player_spin)
 {
   case 1:
   player_spin = 5;
   break;
   case 2:
   player_spin = 10;
   break;
   case 3:
   player_spin = 15;
   break;
 }
 cout << "you spun" << player_spin >> endl;
 }