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 https://www.youtube.com/watch?v=-MmRvZ538f4]

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

Source Code: C 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", &pound);

    printf("Weight in Kilograms is %f\n", (pound * KG) );

    return 0;
}

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

C Program To Convert Kilograms to Pounds

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

Note: 1 Kilogram is approximately equal to 2.20462 Pound.

kilogram to pound

Formula To Convert Weight From Kilograms to Pounds

pound = kilogram * 2.20462;

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

Logic To Convert Kilograms to Pounds

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

Video Tutorial: C Program To Convert Kilograms to Pounds


[youtube https://www.youtube.com/watch?v=puxuafYkOh0]

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

Source Code: C Program To Convert Kilograms to Pounds

#include<stdio.h>

int main()
{
    const float POUND = 2.20462;
    float kg;

    printf("Enter weight in Kilograms\n");
    scanf("%f", &kg);

    printf("Weight in Pounds is %f\n", (kg * POUND));

    return 0;
}

Output 1:
Enter weight in Kilograms
5
Weight in Pounds is 11.023099

Output 2:
Enter weight in Kilograms
14
Weight in Pounds is 30.864678

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

C Program To Determine Weight Class of a Boxer

In boxing the weight class of a boxer is decided as per the following table. Write a C program that receives weight as input and prints out the boxer’s weight class.

Boxer Class Weight In Pounds
Flyweight < 115
Bantamweight 115 – 121
Featherweight 122 – 153
Middleweight 154 – 189
Heavyweight >= 190

Related Read:
else if statement in C
Relational Operators In C

Expected Output for the Input

User Input:
Enter boxers weight in pounds
500

Output:
Boxer is of weight class Heavyweight

Video Tutorial: C Program To Determine Weight Class of a Boxer


[youtube https://www.youtube.com/watch?v=sAvmrWLplPU]

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

Source Code: C Program To Determine Weight Class of a Boxer

#include < stdio.h >

int main()
{
    int wt;

    printf("Enter boxers weight in pounds\n");
    scanf("%d", &wt);

    if(wt < 115)
    {
        printf("Boxer is of weight class Flyweight\n");
    }
    else if(wt >= 115 && wt <= 121)
    {
        printf("Boxer is of weight class Bantamweight\n");
    }
    else if(wt >= 122 && wt <= 153)
    {
        printf("Boxer is of weight class Featherweight\n");
    }
    else if(wt >= 154 && wt <= 189)
    {
        printf("Boxer is of weight class Middleweight\n");
    }
    else if(wt >= 190)
    {
        printf("Boxer is of weight class Heavyweight\n");
    }

    return 0;
}

Output 1:
Enter boxers weight in pounds
108
Boxer is of weight class Flyweight

Output 2:
Enter boxers weight in pounds
120
Boxer is of weight class Bantamweight

Output 3:
Enter boxers weight in pounds
140
Boxer is of weight class Featherweight

Output 4:
Enter boxers weight in pounds
180
Boxer is of weight class Middleweight

Output 5:
Enter boxers weight in pounds
200
Boxer is of weight class Heavyweight

boxers weight class

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