C prgoram to convert inch to feet

C program to convert a number in Inch to Feet.

Sol.

#include<stdio.h>  
int main()   
{  
float inch, feet;  
printf("Enter any number in Inch: \n");
scanf("%f", & inch);
//1 Feet = 0.0833333 Inch
feet = 0.0833333 * inch;
printf ("Value in Inch is:\n%f", feet);   
return 0;  
} 

Output:




Share:

Post a Comment

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.