Convert feet to inches
Write a C program to convert feet to inches. Here’s simple program to convert feet to inches in C Programming Language.
In this program, we take input from the user to enter an integer value of feet which he/she wants to convert it into inches. As we know that “1 feet = 12 inches”, so we use the basic formula for the conversion of feet into inches i.e (inches = feet * 12) to get result in inches.
Below is the source code for C program to convert feet to inches which is successfully compiled and run on Windows System to produce desired output as shown below :
SOURCE CODE : :
/* C program to convert feet to inches */ #include<stdio.h> int main() { int feet,inches; printf("Enter the value of feet: "); scanf("%d",&feet); //converting into inches inches=feet*12; printf("\nTotal inches will be: %d\n",inches); return 0; }
OUTPUT : :
/* C program for conversion of feet to inches */ Output :: Enter the value of feet: 10 Total inches will be: 120
Above is the source code for C program for conversion of feet to inches which is successfully compiled and run on Windows System.The Output of the program is shown above .
If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.
Thanks for reading the post….