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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!