Question: What would I need to do in order for my code to print out too low or too high if the number is wrong, and

Proje package com.company import java.util.Scanner; class scratch { //ClassName public static void main(String[] args) { Scanner input = new Scanner(System.in); int pax, min, guess, secret, maxAttempts = 5; System.out.println("What would be the low range: "); min = 'input.nextInt(); Systen.out.println("high range: "); max = input.nextInt(); System.out.println("Please pick a "number between " + minit "-" + max); guess = input.nextInt(); System.out.printin("Your guess-'is: guess); secret = (int) (Math.random() * (max - min + 1) + min); 26 If What would be the low range: 10 high range: 5.100. Please pick a number between 10-100 :50 Your guess is: 50 Process finished with exit code 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
