Q:

Program to Convert millimeter to Feet

belongs to collection: Miscellaneous Programs Examples

0

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

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

 

Feet = millimeter / 304.8

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program 1: Write a Program in C for converting the value of millimeter into Feet.

// This is a C program which converts the value of millimeter into the value of Feet   
#include<stdio.h>  
int main()   
{  
int millimeter = 80;  
double Feet;  
Feet = millimeter / 304.8;  
printf ("Value of 80 millimeter in Feet is: %.2f \n", Feet);   
return 0;  
}  

 

Output of Above C program:

Value of 80 millimeter in Feet is: 0.26

 

Program 2: Write a Program in PHP for converting the value of millimeter into Feet.

<?php   
// This is a PHP program which converts the value of millimeter into the value of Feet   
$millimeter = 10;   
Feet = millimeter / 304.8;   
echo("Value of 10 millimeter in Feet is " . $Feet . "\n");   
?> 1  

 

Output of Above PHP program:

Value of 10 millimeter in Feet is: 0.0328

 

Program 3: Write a Program in Java for converting the value of millimeter into Feet.

// This is a Java program which converts the value of millimeter into Feet  
import java.io.*;   
class convert {   
static double Conversion_millimeter_to_Feet(int millimeter)   
{   
double Feet;  
Feet = millimeter / 304.8;    
System.out.printf("Value in Feet is: %.4f \n", Feet);   
return 0;   
}    
public static void main(String args [])   
{   
int millimeter = 1;   
Conversion_millimeter_to_Feet(millimeter);   
}  
}  

 

Output of Above Java program:

Value in Feet is: 0.0033

 

Program 4: Write a Program in Python for converting the value of millimeter into Feet.

# This is a Python program which converts the value of millimeter into Feet  
  
millimeter=int(input("Enter the value of length in millimeter:"))   
#convert millimeter to Feet  
Feet = millimeter / 304.8;    
  
print("The length in Feet",round(Feet,2))  

 

Output of Above Python program:

Enter the value of length in millimeter:5000
The length in Feet 16.4

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Miscellaneous Programs Examples

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Program to Convert Feet to m... >>
<< Program to Convert mm to cm...