Home » Program to Convert Inches to cm

Program to Convert Inches to cm

by Online Tutorials Library

Program to Convert Inches to cm

Here, we will learn how to convert the length value, which is given in inches, to the length in centimeter.

If we want to convert the value of inches into cm value, then we have to use the following formula:

cm = 2.54 * inches.

Program 1: Write a Program in C for converting the value of Inches into cm.

Output:

Value in Centimeter is: 101.6  

Program 2: Write a Program in PHP for converting the value of Inches into cm.

Output:

Value of 10 inches in Centimeter is: 25.4  

Program 3: Write a Program in Java for converting the value of Inches into cm.

Output:

Value in Centimeter is: 50.8   

Program 4: Write a Program in Python for converting the value of Inches into cm.

Output:

Enter the length in Inches: 24  The length in centimeter 60.96  

You may also like