Write a C program to convert length in inches to centimeters.

 Practice Problems For Beginners-2

Problem Statement:-Write a C program to convert length in inches to centimeters.

Code:- 

#include<stdio.h>
#include<conio.h>
void main()
{
 float inch, cm;
 printf("Enter length in inches: ");
 scanf("%f", &inch);
 cm=inch*2.54;
 printf("Equivalent length in centimeter: %.2f", cm);
 getch();
}


Output:-



Post a Comment

0 Comments