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

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 then adjust the range if its too high or too low
What would I need to do in order for my code to
print out too low or too high if the number is wrong,
As well as, having 5 max tries, and if number is not guessed end program

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

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!