Program 1: Write a Program in C for converting the value of Inches into millimeter.
#include<stdio.h>
int main()
{
int Inches = 25;
double millimeter;
millimeter = 25.4 * Inches; //This formula converts the value of inches into millimeter.
printf ("Value of 25 inches in millimeter is: %.2f \n", millimeter);
return 0;
}
Output:
Value of 25 inches in millimeter is: 635.00
Program 2: Write a Program in PHP for converting the value of Inches into millimeter.
<?php
// This is a PHP program which converts the value of Inches into millimeter
$Inches = 500;
$millimeter = 25.4 * $Inches; //This formula converts the value of inches into millimeter.
echo("Value of 500 inches in millimeter is: " . $millimeter . "\n");
?>
Output:
Value of 500 inches in millimeter is: 12700
Program 3: Write a Program in Java for converting the value given in Inches into value in millimeter.
// This is a Java program which converts the value of Inches into millimeter
import java.io.*;
class convert {
static double Conversion_Inches_to_millimeter(int Inches)
{
double millimeter;
millimeter = 25.4 * Inches; //This formula converts the value of inches into millimeter.
System.out.printf("Value of 8 inches in millimeter is: %.2f \n", millimeter);
return 0;
}
public static void main(String args [])
{
int Inches = 8;
Conversion_Inches_to_millimeter(Inches);
}
}
Output:
Value of 8 inches in millimeter is: 203.2
Program 4: Write a Program in Python for converting the value of Inches into millimeter.
# This is a Python program which converts the value of Inches into millimeter
Inches=int(input("Enter the length in Inches:"))
#convert Inches to millimeter
millimeter = 25.4 * Inches; #//This formula converts the value of inches into millimeter.
print("The length in millimeter",round(millimeter,2))
Output:
Enter the length in Inches: 1
The length in millimeter 25.4
Program 1: Write a Program in C for converting the value of Inches into millimeter.
Output:
Program 2: Write a Program in PHP for converting the value of Inches into millimeter.
Output:
Program 3: Write a Program in Java for converting the value given in Inches into value in millimeter.
Output:
Program 4: Write a Program in Python for converting the value of Inches into millimeter.
Output: