you can edit your post your make the correction
it's a good start.
first to answer your question about breaking out of a loop: this happens not infrequently. a common solution is to have a flag before the switch statement like:
bool needtobreak=false;
then you have your switch statement, where if you wanted to break from loop you would simply do:
needtobreak=true;
and then after your switch statement you would have
if (needtobreak)
break;
Now some more general comments:
You are using some styles that would be considered ok in the early days but are frowned upon these days.
For example, using numeric error codes. You dont want to use any magical numbers in your coder, it makes it very hard to read as it gets bigger. A better solution might be to define at the begining of your file:
#define ERROR_BADWEIGHT 1
then in your code:
err_msg(ERROR_BADWEIGHT)
and in void err_msg(int error you wouild have:
if ( error == BADWEIGHT)
you are also repeating a lot of code like with dif functions for each planet. it would be a good excercise to try to make it more generic, with at the very least a single function like:
PrintWeightOnPlanet(char* planetname, double weightconversionfactor)