Java program to convert feet to inches

Views: 2204   

Following program shows you how to convert feet to inches.
In this program we get feet from user, we get those we need to multiply with 12 so that we get in inches

import java.util.Scanner;

public class MathUnitConversions4 {

    public static void main(String[] args) {

        double feet;

        Scanner in = new Scanner(;

        System.out.println("Please enter feet:");
        feet = in.nextDouble();

        double inches = feet * 12;

        System.out.println(inches + " Inches");



Please enter feet:
180.0 Inches
On By