repl.it
@AmatuerHour/

Lil Mac

C++

Play a game where you determine your weight on different planets.

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
51
52
53
54
#include <iostream>

int main() {
  double weight;
  std::cout << "You are part of the planetary police, and you go from planet to planet fighting the most evil of villians.\n";
  int planet, answer1, answer2, answer3, answer4, answer5 ;
  std::cout << "What is you weight in pounds?\n";
  std::cin >> weight;
  std::cout << "I have information about 6 planets: \n";
  std::cout << "Planet 1 : Hitler's Venus\n";
  std::cout << "Planet 2 : Bruno Mars\n";
  std::cout << "Planet 3 : Sailor Juipiter\n";
  std::cout << "Planet 4 : Saturnday Night Live\n";
  std::cout << "Planet 5 : Uranus is full of Gas \n";
  std::cout << "Planet 6 : Neptune, King of the Sea\n";
  std::cout << "Which planet do you choose?\n";
  std::cin >> planet;
     if (planet == 1) {
  weight = weight * 0.78;  
  }
  else if (planet == 2) {
    weight = weight * 0.39;
  }
  else if (planet == 3) { 
    weight = weight * 2.65;
  }
  else if (planet == 4) {
    weight = weight * 1.17;
  } 
  else if (planet == 5) {
    weight = weight * 1.05;
  }    
  else if (planet == 6) {
    weight = weight * 1.23;
  }
  else {
    std::cout << "You blast off into space, never to be seen again!\n";
    std::cout << "You awaken twenty years after being blasted off into space. You've landed on a preivously unknown planet. The world is full of towering plants of an imense range of colours. From dark brown to the lightest of reds these plants surround you forming a dark, yet soothing atmosphere. As you look around you can pick up either a stick. number one, a broken knife. number two, or an odd looking plant. number three. Which will you pick up?\n";
    std::cin >> answer1;
      if (answer1 == 1)
        std::cout << "You pick up the stick. Nothing appears to be unusual about it, until you try to let go of the stick. The stick is stuck to your hand, and you soon feel a sharp pain erupting from the contact poinit. You try to pry the stick off but it only digs deeper into your hand. The stick seems to grow larger the longer it's attached. Within a mater of seconds you feel light headed and are bashed in the head with a piece of timber rivaling that of an ancient oak.\n";
  }
  if (planet >=1 && planet <= 6) {
    std::cout << "You now weigh " << weight << " pounds!\n"; 
}
    if (planet == 1) {
      if(rand() % 3 != 1) {
      std::cout << "You've won the match against Hitler!";
      }
      else {
        std::cout << "Hitler mercilessly executed you.";
      }
    }
}
?