#include #include using namespace std; const bool DEBUG = false; void main() { double planetWeight, earthWeight; int planetNum; cout << "Enter your earth weight (LBS): "; cin >> earthWeight; cout << "Enter the planet number (0-8): "; cin >> planetNum; if (DEBUG) cout << "earthLBS = " << earthWeight << "; planetNum = " << planetNum << endl; switch (planetNum) { case 1: planetWeight = earthWeight * .08; if (DEBUG) cout << "Case 1: planetWeight = " << planetWeight << endl; break; case 2: planetWeight = earthWeight * .89; if (DEBUG) cout << "Case 2: planetWeight = " << planetWeight << endl; break; case 3: planetWeight = earthWeight * 1.0; if (DEBUG) cout << "Case 3: planetWeight = " << planetWeight << endl; break; case 4: planetWeight = earthWeight * .38; if (DEBUG) cout << "Case 4: planetWeight = " << planetWeight << endl; break; case 5: planetWeight = earthWeight * 2.8; if (DEBUG) cout << "Case 5: planetWeight = " << planetWeight << endl; break; case 6: planetWeight = earthWeight * .98; if (DEBUG) cout << "Case 6: planetWeight = " << planetWeight << endl; break; case 7: planetWeight = earthWeight * 1.2; if (DEBUG) cout << "Case 7: planetWeight = " << planetWeight << endl; break; case 8: planetWeight = earthWeight * .78; if (DEBUG) cout << "Case 8: planetWeight = " << planetWeight << endl; break; default: planetWeight = earthWeight * 0.0; if (DEBUG) cout << "Default: planetWeight = " << planetWeight << endl; break; } cout << "Your weight on the planet is: " << planetWeight << endl; }