C program to convert pounds to kilogram for SEE and NEB
Introduction:
In this blog post, we'll look at how to write a C program to convert pounds to kilogram for SEE and NEB. Students preparing for the SEE and NEB exams can benefit from this program.
Understanding the Conversion
Before we get into the programming, it's important to understand the difference between pounds and kilograms. Pounds and kilograms are weight units that are commonly used around the world. While pounds are the most commonly used unit of weight in the United States, kilograms are the standard unit of weight in the majority of other countries. The pound-to-kilogram conversion factor is 1 pound = 0.45359237 kilograms.
The steps involved in writing the program are as follows:
- We must first declare the variables. We'll need a variable to keep the weight in pounds and another to keep the weight in kilograms.
- The user's weight must then be obtained. We can accomplish this with the scanf() function.
- We need to convert the weight to kilograms once we have it. This can be accomplished by multiplying the weight by 0.453592.
- Finally, the weight in kilograms must be printed. We can accomplish this with the printf() function.
Coding:
#include<stdio.h>
#include<conio.h>
main()
{
float p,k;
printf("Enter pounds:");
scanf("%f",&p);
k=p/2.2;
printf("Kilogram=%f",k);
getch();
}
Output:
Conclusion:
Finally, this article provided an overview of how to write a C program to convert pounds to kilogram for SEE and NEB, with a focus on students preparing for the SEE and NEB exams. Students will be better prepared for exams if they use this program to convert weights and answer conversion-based questions.
No comments:
Post a Comment