Answer to Question #56629 in Java | JSP | JSF for Lindoln Noah Garcia

Question #56629
3. Create a JAVA program that will input a value of measure in inches and output its equivalent in measure feet. Conversion Factor: 12 inches = 1 foot
1
Expert's answer
2015-12-02T08:03:54-0500
import java.util.Scanner;

public class Foot {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
double inches;
inches = sc.nextDouble();
System.out.println(inches / 12);
}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS