Answer to Question #183000 in C++ for Vincenzo Santoro

Question #183000

Write a program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds (Note that 1 kilogram equals 2.2 pounds). Format your output with two decimal places.


1
Expert's answer
2021-04-22T03:42:08-0400


using namespace std;


main(void)
{
	float Wt_Kg,Wt_lbs;
	int Flag=1;
	
	while(Flag)
	{
		cout<<"\n\nEnter weight in Kgs. = "; cin>>Wt_Kg;
		Wt_lbs = Wt_Kg*2.2;
		cout<<"\nEquivalent weight in Pounds = "<<Wt_lbs<<" lbs";
		cout<<"\n\nPress 1/0 to Continue/QUIT: "; cin>>Flag;
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS