Program 1: Write a Program in C for converting the value of cm into millimeter.
#include<stdio.h>
int main()
{
double value_in_cm = 40.8;
double millimeter;
millimeter = value_in_cm * 10;
printf ("Value in millimeter is: %.2f \n", millimeter);
return 0;
}
Output:
Value in millimeter is: 408.00
Program 2: Write a Program in PHP for converting the value of cm into millimeter.
<?php
// This is a PHP program which converts the value of cm into the value of millimeter
$cm = 105;
$millimeter = $cm * 10;
echo("Value of 100 cm in millimeter is " . $millimeter . "\n");
?>
Output:
Value of 105 cm in millimeter is 1050
Program 3: Write a Program in Java for converting the value of cm into millimeter.
// This is a Java program which converts the value of cm into millimeter
import java.io.*;
class convert {
static double Conversion_cm_to_millimeter(double cm)
{
double millimeter;
millimeter = cm * 10;
System.out.printf("Value in millimeter is: %.2f \n", millimeter);
return 0;
}
public static void main(String args [])
{
double cm = 1.5;
Conversion_cm_to_millimeter(cm);
}
}
Output:
Value in millimeter is: 15.00
Program 4: Write a Program in Python for converting the value of cm into millimeter.
# This is a Python program which converts the value of cm into millimeter
cm = int(input("Enter the length in cm:")) // Takes the input from user.
#convert cm to millimeter
millimeter = cm * 10;
print("The length in millimeter",round(millimeter,2))
Output:
Enter the length in cm: 250
The length in millimeter 2500
Program 1: Write a Program in C for converting the value of cm into millimeter.
Output:
Program 2: Write a Program in PHP for converting the value of cm into millimeter.
Output:
Program 3: Write a Program in Java for converting the value of cm into millimeter.
Output:
Program 4: Write a Program in Python for converting the value of cm into millimeter.
Output: