Convert Feet To Inches C Program

By | June 16, 2019

Task:Write a C program to Convert Feet To Inches C Program

This program is written in C language. It converts given input in Feet into inches. We know that there are 12 inches in one foot. So we will multiply given feet by 12 to convert it into inches.

Convert Feet To Inches C Program

Convert Feet To Inches C Program

This is a simple formula calculation C program. It contains the following types of statements:

  1. Writing Basic structure of a C program
  2. Using variable declaration
  3. Use of printf() function to display output or messages to the user.
  4. Using scanf() function for input at run time.
  5. Calculating simple formula with simple arithmetic operators using assignment statement etc.

Feet to Inches Converter C Program

#include<stdio.h>

int main()
{
   float feet, inches;
   printf("Enter Feet to be converted into Inches:");
   scanf("%f", &feet);
   inches = feet * 12;
   printf("Inches are=%.2f",inches);
   return 0;
}

 1,246 total views,  6 views today

Leave a Reply

Your email address will not be published. Required fields are marked *