How do you write a program that asks the user for a weight in kilograms and converts it to pounds. There are 2.2 pounds in a kilogram.
Answers
Answered by
0
# Write a program that asks the user
# to enter a weight in pounds.
# The program should convert it to kilograms.
# using the formula
# 1 Pound = 0.453592 Kilograms
# or 1 Lb = 0.453592 Kg
pounds = float(input('Enter weight in Pounds(Lbs) to Convert into Kilograms:'))
kilo_grams = pounds * 0.453592
print(pounds,' Pounds (Lbs) are equal to', kilo_grams,'Kilograms (Kgs)')
Explanation:
sub to my channel pls
The Coding Expert
73 subs
Answered by
1
Program To Convert Pounds to Kilograms
#include<stdio.h>
int main()
{
const float KG = 0.453592;
float pound;
printf("Enter weight in pounds\n");
scanf("%f", £);
printf("Weight in Kilograms is %f\n", (pound * KG) );
return 0;
}
Output 1:
Enter weight in pounds 11
Weight in Kilograms is 4.989512
Similar questions
Math,
1 day ago
Computer Science,
1 day ago
English,
1 day ago
Math,
2 days ago
English,
8 months ago
World Languages,
8 months ago