Write a program that converts pounds into kilo- grams. The program prompts the user to enter a number in pounds, converts it to kilograms, and displays the result. One pound is 0.454 kilograms.

(Convert pounds into kilograms) Write a program that converts pounds into kilo-
grams. The program prompts the user to enter a number in pounds, converts it to 
kilograms, and displays the result. One pound is 0.454 kilograms.

#Beginner
In gcc c++ compiler using namespace std;


#include<iostream>
using namespace std;

int main()
{
float pound;
cout<<"enter the pound :";
cin>>pound;
float kilogram = pound * 0.454 ;
cout<<"pound "<<pound<<" is kilogram "<<kilogram;
return 0;
}


Output
enter the pound :55.5
pound 55.5 is kilogram 25.197
[Program finished]


Comments

Popular posts from this blog

Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meter.

Body Mass Index (BMI) is a measure of health based on height and weight. You can calculate your BMI by taking your weight in kilograms and dividing it by the square of your height in meters

Write a program that prompts the user to enter the coordinates of two points (x1, y1) and (x2, y2), and displays the slope of the line that connects the two points. The formula of the slope is (y2 - y1)/(x2 - x1).