CODE
{
// Variables
char start_input[8]; //this will either be planets, units, or start
cout << "This will tell you the distance between two planets and how long it will take for you to get there. You have your choice of units of measure.\n " << endl;
cout << "1. For a list of supported locations type planets." << endl;
cout << "2. For a list of supported units type units." << endl;
cout << "3. To start type start." << endl;
cin >> start_input;
if (strcmp ( start_input, "planets") ==0 )
cout << endl << "Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto \n" << endl;
else if (strcmp ( start_input, "units") ==0 )
---->> cout << "meters kilometers parsecs AU seconds days months years \n" << endl;
else if (strcmp ( start_input, "start") ==0 )
cout << "start \n" << endl;
else cout << "learn to read English \n" << endl;
return 0;
}
// Variables
char start_input[8]; //this will either be planets, units, or start
cout << "This will tell you the distance between two planets and how long it will take for you to get there. You have your choice of units of measure.\n " << endl;
cout << "1. For a list of supported locations type planets." << endl;
cout << "2. For a list of supported units type units." << endl;
cout << "3. To start type start." << endl;
cin >> start_input;
if (strcmp ( start_input, "planets") ==0 )
cout << endl << "Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto \n" << endl;
else if (strcmp ( start_input, "units") ==0 )
---->> cout << "meters kilometers parsecs AU seconds days months years \n" << endl;
else if (strcmp ( start_input, "start") ==0 )
cout << "start \n" << endl;
else cout << "learn to read English \n" << endl;
return 0;
}
It's a small scale program I am writing to teach myself C++, that gives the time and distance between any two planets and the user will be able to select the units.
Thanks,
Matty