Write a C program to convert feet to inches

By | 03.11.2016

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….

5 2 votes
Article Rating
Category: Basic Programs C Programming Tags:

About Tunde A

My name is Tunde Ajetomobi, a Tech Enthusiast and Growth Hacker. I enjoy creating helpful content that solves problem across different topics. Codezclub is my way of helping young aspiring programmers and students to hone their skills and find solutions on fundamental programming languages.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments