Problem: Create a program to calculate the weight of a person on another planet. The person should enter his/her weight on earth and select a planet. Because there are multiple planets that begin with the same name, you will probably want the user to enter something like 1 for Mercury, 2 for Venus, 3 for Earth, etc. Below are the conversion factors the planets in the solar system, as well as for Pluto and the moon:
Mercury Venus Earth Mars Moon Jupiter Saturn Uranus Neptune Pluto
0.4155 0.8975 1.0 0.3507 0.166 2.5374 1.0677 0.8947 1.1794 0.0899
Use a while loop to confirm that the user enters a correct choice for the planet, and another while loop to confirm that the user enters a valid weight. Use a switch to assign the conversion factor and the planet name to appropriate variables. Calculation and output of the message should occur after the switch structure is complete. No ifs (or else ifs) should appear in your code.