src/main/java/MyMain.java
public static double inputDouble() {
        Scanner scan = new Scanner(System.in);
        while (true) {
            System.out.println("Enter a number between 0.0 and 1000000.0");
            double x = scan.nextDouble();
            if (x > 0.0 && x < 1000000.0) {
                return x;
            }
            else {
            }

        }
    }
// scan.nextDouble() might be useful here
scan.nextDouble() might be useful here
scan . nextDouble () might be useful here
public static double inputDouble() {
        Scanner scan = new Scanner(System.in);
        while (true) {
            System.out.println("Enter a number between 0.0 and 1000000.0");
            double x = scan.nextDouble();
            if (x > 0.0 && x < 1000000.0) {
                return x;
            }
            else {
            }
        }
    }
public static double inputDouble ( ) { Scanner scan = new Scanner ( System . in ) ; while ( true ) { System . out . println ( "Enter a number between 0.0 and 1000000.0" ) ; double x = scan . nextDouble ( ) ; if ( x > 0.0 && x < 1000000.0 ) { return x ; } else { } } }
scan.nextDouble() might be useful here
scan . nextDouble () might be useful here