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.
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;
}
}
Comments
Leave a comment