-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspace.cpp
More file actions
45 lines (36 loc) · 840 Bytes
/
space.cpp
File metadata and controls
45 lines (36 loc) · 840 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
41
42
43
44
45
#include <iostream>
int main() {
double weight;
std::cout << "Input your Earth Weight: ";
std::cin >> weight;
std::cout << "\nI have information for the following planets:\n\n";
std::cout << " 1. Mercury 2. Venus 3. Mars 4. Jupiter\n";
std::cout << " 5. Saturn 6. Uranus 7. Neptune\n\n";
int x;
std::cout << "Input a number for the planet you want to fight on: ";
std::cin >> x;
switch(x){
case 1:
weight *= 0.38;
break;
case 2:
weight *= 0.91;
break;
case 3:
weight *= 0.38;
break;
case 4:
weight *= 2.34;
break;
case 5:
weight *= 1.06;
break;
case 6:
weight *= 0.92;
break;
case 7:
weight *= 1.19;
break;
}
std::cout << "\nYour Weight: " << weight << "\n";
}