{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Source.cpp - /Samvel Mheryan/CSIS 135 Monday...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//Samvel Mheryan //CSIS 135 Monday Night //Homework #2 #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { //assign variables string planetName; char select; double weight, speed, surfGrav, distSun, travelhours, newweight; string Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune; //display intro cout << "Welcome to INTERPLANETARY TRAVEL PROGRAM!" << endl; cout << "This program enables you to find out your travel time to the planet" << endl; cout << "you want to travel to as well as your weight on that planet." << endl; cout << "Please enjoy the program and find the perfect planet for you!\n"; cout << "\n\nINTERPLANETARY TRAVEL MENU" << endl; cout << "--------------------------" << endl; // display menu and get selection from the user cout << "a) Mercury\n" << "b) Venus\n" << "c) Earth\n" << "d) Mars\n" << "e) Jupiter\n" << "f) Saturn\n" << "g) Uranus\n" << "h) Neptune\n" << "q) quit\n" << endl; cout << "Select a planet to travel to or q to quit the program: \n"; cin >> select; // ask for weight and speed rate if (select >= 'a' && select <= 'h') { cout << "Please enter your weight (in lbs): " << endl; cin >> weight;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}