Answer:
#include <iostream>
#include<iomanip>
using namespace std;
int main()
{
double mass,e,m,v;
cout<<"Enter the mass : ";
cin>>mass;
cout<<"The mass is "<<mass<<" kg\\";
if(mass<=0){
cout<<" mass must be greater than zero";
return 0;
}
e= mass * 9.81;
m= mass * 1.62;
v = mass * 8.87;
cout.setf(ios::fixed);
cout<<"Location"<<right<<setw(10)<<"Weight\\";
cout<<"Earth"<<right<<setw(15)<<setprecision(4)<<e<<endl;
cout<<"Moon"<<right<<setw(15)<<setprecision(4)<<m<<endl;
cout<<"Venus"<<right<<setw(15)<<setprecision(4)<<v<<endl;
cout<<endl<<endl;
if(m>=1500)
cout<<"Object is light weight";
else
cout<<"Object is heavy weight";
}
Step-by-step explanation: