Simple Program for Convert Feet to Inches in C Programming
On this page (5sections)
About this program
This is an example program in c calculation programs. Read the concept first: Data Types in C Programming, then study the code and output below.
How to convert feet to inches
1 foot is equal to 12 inches:
1ft = 12?
Simple Program for Convert Feet to Inches In C Programming
/*##Simple Program to Convert Feet to Inches In C Programming*/
/*##Simple Calculation Programs,Feet to Inches*/
#include <stdio.h>
int main() {
// Declare Variables
int f,i = 0;
//Read Feet Value
printf("Enter Feet Value : ");
scanf("%d",&f);
//Converting into inches
i=f*12;
//Print Total Inches
printf("Total Inches : %d\n",i);
return 0;
}
Sample Output:
Enter Feet Value : 5
Total Inches : 60
Related Pages
Learn the concept first, then study the code:
- C Programs — Browse all C Programs.
- Data Types in C Programming — Concept — int, float, double and format specifiers.
- Area Of Circle Example C Program — More in c calculation programs.
- Area Of Square Example C Program — More in c calculation programs.