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

Info icon This 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;
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 ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern