Convert mm millimeter to inches

By | June 16, 2019

This is a simple basic C program. it takes input from user at run time. The user enters the value of mm millimeters. These millimeters are then converted into inches by using the following formula:

How to convert mm millimeters to inches

1 millimeter = 0.03937007874 inches:

Therefore we will use the formula for converting mm to in:

inches = given millimetrs   x  0.03937007874

The Source Code of C Program To Convert mm into inches

The Source Code of C Program To Convert mm into inches

Important Statements used in C program to convert mm into in

  1. Writing basic C program structure / template
  2. Declaring variables
  3. Using output statements like printf( ) function to display messages on screen
  4. This program uses scanf( ) function as input statement for getting user input at program execution time.
  5. This C program uses assignment statement for simple formula calculation.

The Source Code of C Program To Convert mm into inches  is as Under

#include<stdio.h>

int main()
{
double mm, inches;
printf(“Enter millimetrs to be converted into Inches:”);
scanf(“%lf”, &mm);
inches = mm * 0.03937007874;
printf(“Inches are=%f”,inches);
return 0;
}

Loading

Leave a Reply

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