Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- ///Question One
- cout <<"T or F - Windows Vista sucked." <<endl;
- char vista;
- cin >> vista;
- switch(vista)
- {
- case 't':
- case 'T':
- cout << "You are correct.";
- break;
- case 'f':
- case 'F':
- cout << "You are wrong.";
- break;
- default:
- cout << "Fail." <<endl;
- }
- ///Question Two
- cout <<"Chose a planet." <<endl;
- cout <<"1. Mercury" <<endl;
- cout <<"2. Venus" <<endl;
- cout <<"3. Mars" <<endl;
- cout <<"4. Jupiter" <<endl;
- cout <<"5. Saturn" <<endl;
- cout <<"6. Uranus" <<endl;
- cout <<"7. Neptune" <<endl;
- int planet;
- cin >> planet;
- cout <<"Input your weight." <<endl;
- int weight;
- cin >> weight;
- int mercweight = weight * .37;
- int venweight = weight * .88;
- int marweight = weight * .38;
- int jupweight = weight * 2.64;
- int satweight = weight * 1.15;
- int urweight = weight * 1.15;
- int nepweight = weight * 1.12;
- switch(planet)
- {
- case 1:
- cout <<"Your weight on Merucry is ";
- cout <<mercweight; <<endl;
- break;
- case 2:
- cout <<"Your weight on Venus is ";
- cout <<venweight; <<endl;
- break;
- case 3:
- cout <<"Your weight on Mars is ";
- cout <<marweight; <<endl;
- break;
- case 4:
- cout <<"Your weight on Jupiter is ";
- cout <<jupweight; <<endl;
- break;
- case 5:
- cout <<"Your weight on Saturn is ";
- cout <<satweight; <<endl;
- break;
- case 6:
- cout <<"Your weight on Uranus is ";
- cout <<urweight; <<endl;
- break;
- case 7:
- cout <<"Your weight on Neptune is ";
- cout <<nepweight; <<endl;
- }
- ///Question Three
- return 0;
- }
Add Comment
Please, Sign In to add comment