LAB: Miles to track laps One lap around a standard high-school running track is exactly 0.25 miles. Write a program

LAB: Miles to track laps One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input, and outputs the number of laps. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System. out. printf(“%.2f”, yourValue); Ex: If the input is: 1.5 the output is: 6.00 Ex: If the input is: 2.2 the output is: 8.80 Your program must define and call a method: public static double milestoLaps (double userMiles) LAB ACTIVITY 3.21.1: LAB: Miles to track laps 0/10 LabProgram. java Load default template. 1 import java. util. Scanner; 2 3 public class LabProgram { /* Define your method here */ public static void main(String[] args) { /* Type your code here. Your code must call the method. / } 10

Leave a Reply

Your email address will not be published. Required fields are marked *