Guest User

Untitled

a guest
Jan 12th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.61 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     ///Question One
  7.     cout <<"T or F - Windows Vista sucked." <<endl;
  8.         char vista;
  9.             cin >> vista;
  10.     switch(vista)
  11.     {
  12.     case 't':
  13.     case 'T':
  14.         cout << "You are correct.";
  15. break;
  16.     case 'f':
  17.     case 'F':
  18.         cout << "You are wrong.";
  19. break;
  20.     default:
  21.         cout << "Fail." <<endl;
  22.     }
  23.     ///Question Two
  24.     cout <<"Chose a planet." <<endl;
  25.  
  26.     cout <<"1. Mercury" <<endl;
  27.         cout <<"2. Venus" <<endl;
  28.             cout <<"3. Mars" <<endl;
  29.                 cout <<"4. Jupiter" <<endl;
  30.                     cout <<"5. Saturn" <<endl;
  31.                         cout <<"6. Uranus" <<endl;
  32.                             cout <<"7. Neptune" <<endl;
  33.     int planet;
  34.         cin >> planet;
  35.    
  36.     cout <<"Input your weight." <<endl;
  37.         int weight;
  38.             cin >> weight;
  39.    
  40.     int mercweight = weight * .37; 
  41.         int venweight = weight * .88;
  42.             int marweight = weight * .38;
  43.                 int jupweight = weight * 2.64;
  44.                     int satweight = weight * 1.15;
  45.                         int urweight = weight * 1.15;
  46.                             int nepweight = weight * 1.12;
  47.  
  48. switch(planet)
  49. {
  50.  
  51.  
  52. case 1:
  53.         cout <<"Your weight on Merucry is ";
  54.         cout <<mercweight; <<endl;
  55.     break;
  56.  
  57. case 2:
  58.         cout <<"Your weight on Venus is ";
  59.         cout <<venweight; <<endl;
  60.     break;
  61.  
  62. case 3:
  63.     cout <<"Your weight on Mars is ";
  64.     cout <<marweight; <<endl;
  65.     break;
  66.  
  67. case 4:
  68.     cout <<"Your weight on Jupiter is ";
  69.     cout <<jupweight; <<endl;
  70.     break;
  71.  
  72. case 5:
  73.     cout <<"Your weight on Saturn is ";
  74.     cout <<satweight; <<endl;
  75.     break;
  76. case 6:
  77.     cout <<"Your weight on Uranus is ";
  78.     cout <<urweight; <<endl;
  79.     break;
  80. case 7:
  81.     cout <<"Your weight on Neptune is ";
  82.     cout <<nepweight; <<endl;
  83. }
  84. ///Question Three
  85.  
  86.  
  87. return 0;
  88.  
  89.  
  90.  
  91.  
  92. }
Add Comment
Please, Sign In to add comment