Write a java program that declares a variable in inches, which holds a length in inches, and assign a value 100 inches. Display the value in feet and inches; for example, 86 inches becomes 7 feet and 2 inches. Print the results of conversion of 100 inches into feet and inches.
Java 11 please
Here is your program...
import java.util.Scanner;
public class Conversion {
public static void main(String[] args) {
double inches = 100;
int value = (int)(inches / 12);
int value1 = (int)(inches % 12);
System.out.println(value + " Feet and " + value1 + "
inches");
}
}
Get Answers For Free
Most questions answered within 1 hours.