Answer:
Java.
Step-by-step explanation:
import java.util.Scanner;
///////////////////////////////////////////////////////////
public class MyClass {
static void miles_to_laps(float miles) {
double laps = miles/0.25;
System.out.printf("Number of laps: %s", String.format("%.2f", laps));
}
///////////////////////////////////////////////////////////
public static void main(String args[]) {
System.out.print("Enter miles: ");
Scanner input = new Scanner(System.in);
float miles = input.nextFloat();
if (miles < 0) {
System.out.println("Invalid input");
}
else
miles_to_laps(miles);
}
}
I have used the Scanner library for user input.