Question: #include #include using namespace std; int main() { double mass, weightEarth, weightMoon, weightMars; //Declare variables for earth,moon and mars const double earth = 9.81; const
#include
#include
using namespace std;
int main() {
double mass, weightEarth, weightMoon, weightMars;
//Declare variables for earth,moon and mars
const double earth = 9.81;
const double moon = 1.62;
const double mars = 3.77;
cout
cout
cin >> mass;
if (mass
cout
else
{
weightEarth = mass * earth;
weightMoon = mass * moon;
weightMars = mass * mars;
//formatting using setw ,left and right
cout
cout
cout
cout
if (weightEarth
cout
else if (weightEarth >= 1000)
cout
}
return 0;
} //End function main

Above is the expected output if the input is 1. Being confusing for the errors. 
packages. C4700 uninitialized local variable 'mass' used lesson4part1 lesson4part1.cpp 21 tro
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
