C Programming code to convert inches to centimeters

C Programming code to convert inches to centimeters
Algorithm

  1. Accept the number in inches
  2. Calculate centimeter using the formula
  3. Display the output

Code
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float n,m;
printf("Enter the number in inches \n");
scanf("%f",&n);
m=n*2.54;
printf("\n Number in inches= %f",n);
printf(" \n Number in centimeters= %f",m);
getch();
}

Share this article:
Previous Post: Microprocessor 8085 Code to move data from Register to memory

September 30, 2014 - In Academics, Computers

Next Post: C program to find sum and average of two numbers

October 1, 2014 - In Academics, Computers

Related Posts

Leave a Reply

Your email address will not be published.