Question: i dont understand why program is not working ? Please help correct errors. (this is in java) Write a program that declares constants to represent

i dont understand why program is not working ? Please help correct errors. (this is in java)

i dont understand why program is not working ? Please help correct

Write a program that declares constants to represent the number of inches, feet, and yards in a mile. Name the constants INCHES_IN_MILE, FEET_IN_MILE , and YARDS_IN_MILE respectively. Also declare a variable named miles to represent a number of miles. Compute and display, with explanatory text, the value in inches, feet, and yardsfor example: 4.0 miles is 253440.0 inches, or 21120.0 feet, or 7040.0 yards 1 import java.util.Scanner; 2 3 class MileConversions { 4 public static void main(String[] args) { 5 final double INCHES_IN_MILE = 63360; 6 final double FEET_IN_MILE = 5280; 7 final double YARDS_IN_MILE = 1760; 8 double miles; 9 double in, ft, yds; 10 11 Scanner sc = new Scanner(System.in); 12 miles = sc.nextDouble(); 13 14 in = miles * INCHES_IN_MILE; 15 ft = miles * FEET_IN_MILE; 16 yds = miles * YARDS_IN_MILE; 17 There are 63,360 inches in a mile, 5,280 feet in a mile, and 1,760 yards in a mile. 18 System.out.println(miles + " miles is " + in +" inches, or ' + ft + " feet, or + yds + " yards."); 19 } 20 } 21

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!