C Program To Convert Pounds to Kilograms


Lets write a C program to Convert weight from Pounds to Kilograms.

Note: 1 Pound is approximately equal to 0.453592 Kilogram.

pound to kilogram

Formula To Convert Weight From Pounds to Kilograms

kilogram = pound * 0.453592;

OR

From our previous video tutorial C Program To Convert Kilograms to Pounds

pound = kilogram * 2.20462;
pound / 2.20462 = kilogram;
kilogram = pound / 2.20462;

Related Read:
Keywords, Constants, Variables: C
Basic Arithmetic Operations In C

Logic To Convert Pounds to Kilograms

First we ask the user to enter weight / mass in pounds. Then we multiply that value with 0.453592. The result itself is the Kilograms equivalent of user entered weight in pound.

Video Tutorial: C Program To Convert Pounds to Kilograms



YouTube Link: https://www.youtube.com/watch?v=-MmRvZ538f4 [Watch the Video In Full Screen.]

Source Code: C Program To Convert Pounds to Kilograms

  1. #include<stdio.h>  
  2.   
  3. int main()  
  4. {  
  5.     const float KG = 0.453592;  
  6.           float pound;  
  7.   
  8.     printf("Enter weight in pounds\n");  
  9.     scanf("%f", &pound);  
  10.   
  11.     printf("Weight in Kilograms is %f\n", (pound * KG) );  
  12.   
  13.     return 0;  
  14. }  

Output 1:
Enter weight in pounds
11
Weight in Kilograms is 4.989512

Output 2:
Enter weight in pounds
11.04
Weight in Kilograms is 5.007656

For list of all c programming interviews / viva question and answers visit: C Programming Interview / Viva Q&A List

For full C programming language free video tutorial list visit:C Programming: Beginner To Advance To Expert

Leave a Reply

Your email address will not be published. Required fields are marked *