Here is the prompt for the question that I need to answer. I am getting several error messages that will not allow me to compile. Any help would be appreciated. Thanks
"Write a program that prompts the user to enter the weight of a person in pounds and outputs the equivalent weight in kilogram and solar masses (used to measure the mass of stars and galaxies).
Output the both weight in pounds and kilograms rounded to three decimal places (trailing zeros if necessary). Output the weight in solar masses in scientific notation with 4 significant digits (for example, 1002 would be output as 1.0020e+003 in C++ scientific notation, which is short for 1.0020 × 10003). The relationship between pounds and kilograms and the relationship between kilograms and solar masses should declared in your program as constants. Use these constants in the conversion formulas."
Put the code you need help with here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# include <iostream>
usingnamespace std;
int main()
{
double weight;
doubleconst weightPound;
doubleconst weightSolar;
cout<<"Enter the weight in pounds: "<<endl;
cin>>weight;
weightPound=(weight* 0.453592);
weightSolar=(weight*5.0279e-31)
cout<<"The weight in kilograms is:"<<setprecision(3)<<fixed<<weight<<endl;
cout<<"The weight in pounds is:"<<setprecision(3)<<weightPound<<endl;
cout<<"the weight in solar masses is: "<<setprecision(4)<<scientific<<weightSolar<<endl;
return 0;
}