Write a program that requests a user to enter weight in kg in c programming. The program converts it in pounds (pound = 2.2*kg).
/* Write a program that requests a user to enter weight in kg. The program converts it in pounds (pound = 2.2*kg) */ #include<stdio.h> #include<conio.h> int main() { float kg,po; printf("Enter weight in kg:\n"); scanf("%f",&kg); po = 2.2*kg; printf("Value in pound is %.1f",po); getch(); return 0; }
Output
For a input 1 kg, pound = 2.2
Also, see how you can convert the temperature.