The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 399 Weeks Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Write a C++ program that asks the user to enter their weight and the first letter of the name on one of the following planets. The program then outputs how much the user would weigh on that planet. The following table gives the factor by which the weight must be multiplied for each planet. The program should output an error message if the user does not enter a letter from the selected letters (V, E, M, J, S). The prompt and the error message should make it clear to the user which letters must be entered. Be sure to use proper formatting and appropriate comments in your code. The output should be clearly labeled and neatly formatted. 'V' stands for Venus and the coefficient is 0.8975 'E' stands for Earth and the coefficient is 1.0 'M' stands for Moon and the coefficient is 0.166 'J' stands for Jupiter and the coefficient is 2.5374 'S' stands for Saturn and the coefficient is 1.0677
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll