C Practice Problems For Beginners-1
Problem Statement:-Write a C program to convert weight in pounds to weight in kilograms
Code:-
#include<stdio.h>
#include<conio.h>
int main()
{
const float KG=0.453592;
float Pound;
printf("Enter weight in pounds:- ");
scanf("%f", &Pound);
printf("Weight in kilograms is %f\n", Pound*KG);
getch();
}
Output:-
0 Comments