What you have:
Code:
if (planet=="Mercury")
cout<< "Your weight on Mercury is " <<weight*Mercury <<"."<<endl;
Can be like this:
Code:
if (planet=="Mercury")
cout<< "Your weight on Mercury is " <<weight*Mercury <<"."<<endl;
if (planet=="mercury")
cout<< "Your weight on Mercury is " <<weight*Mercury <<"."<<endl;
Now, there is ways with strings and such to change case; but since you said this is your 2nd project we will just stay with that.
Also, wouldn't the weight on Mars be your weight multiplied by 0.3507?
No. Sorta, close. Here are more accurate multiples:
Code:
Mercury 0.378
Venus 0.907
Earth 1
Moon .166
Mars .379
Jupiter 2.529
Saturn 1.066
Uranus 0.903
Neptune 1.096
Pluto 0.069
But if your teacher gave you the original numbers use them. Just saying, that are not totally correct