Q. Write a C program to convert kilograms to pounds.
Ans
Formual:
1 kilogram = 2.20462262184878 pounds
Hence, pounds = 2.2 * kilograms
#include<stdio.h>
#include<conio.h>
int main()
{
float kg,pound;
printf("Enter value of Kilograms : ");
scanf("%f",&kg);
pound=2.20462262184878*kg;
printf("\n\t-- Convert Kilograms to pounds --\n");
printf("\n%f kg = %f pound",kg,pound);
getch();
return 0;
}
No comments:
Post a Comment