C Programming code to convert inches to centimeters
Algorithm
- Accept the number in inches
- Calculate centimeter using the formula
- 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();
}
0 Comments