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.
This is a simple formula calculation C program. It contains the following types of statements:
- Writing Basic structure of a C program
- Using variable declaration
- Use of printf() function to display output or messages to the user.
- Using scanf() function for input at run time.
- 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; }