Question: Can someone help me debug this please ? Keep getting error about initializing (inches). The task is to take user input then convert inches to
Can someone help me debug this please ? Keep getting error about initializing (inches). The task is to take user input then convert inches to feet. Thank you.
In Java
import java.util.Scanner; public class InchesToFeetInteractive{ public static void main(String[] args){ int inches; Scanner in = new Scanner(System.in); System.out.println("Enter number of inches: "); int InchesToFeet = nextInt(); int feet = inches/12; int leftover = inches%12; System.out.println(feet + " feet and " + leftover + " inches");
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
