Program 1: Write a Program in C for converting the value of Inches into Feet.
// This is a C program which converts the value of Inches into the value of Feet
#include<stdio.h>
int main()
{
int inches = 40;
double Feet;
Feet = inches / 12;
printf ("Value of 40 inches in Feet is: %.2f \n", Feet);
return 0;
}
Output:
Value of 40 inches in Feet is: 3.33
Program 2: Write a Program in PHP for converting the value of Inches into Feet.
<?php
// This is a PHP program which converts the value of Inches into the value of Feet
$Inches = 10;
Feet = inches / 12;
echo("Value of 10 inches in Feet is " . $Feet . "\n");
?> 1
Output:
Value of 10 inches in Feet is: 0.83
Program 3: Write a Program in Java for converting the value of Inches into Feet.
// This is a Java program which converts the value of Inches into Feet
import java.io.*;
class convert {
static double Conversion_Inches_to_Feet(int Inches)
{
double Feet;
Feet = inches / 12;
System.out.printf("Value in Feet is: %.2f \n", Feet);
return 0;
}
public static void main(String args [])
{
int Inches = 120;
Conversion_Inches_to_Feet(Inches);
}
}
Output:
Value in Feet is: 10.00
Program 4: Write a Program in Python for converting the value of Inches into Feet.
# This is a Python program which converts the value of Inches into Feet
Inches=int(input("Enter the value of length in Inches:"))
#convert Inches to Feet
Feet = Inches / 12;
print("The length in Feet",round(Feet,2))
Output:
Enter the value of length in Inches: 240
The length in Feet 20.0
Program 1: Write a Program in C for converting the value of Inches into Feet.
Output:
Value of 40 inches in Feet is: 3.33
Program 2: Write a Program in PHP for converting the value of Inches into Feet.
Output:
Value of 10 inches in Feet is: 0.83
Program 3: Write a Program in Java for converting the value of Inches into Feet.
Output:
Value in Feet is: 10.00
Program 4: Write a Program in Python for converting the value of Inches into Feet.
Output:
Enter the value of length in Inches: 240 The length in Feet 20.0