Need Help ?
Have a Question ?

(Solved): Task 2: Write A Program That Generates A Random Integer Between 1 And 0 (and Display The Integer), A ...


Task 2: Write a program that generates a random integer between 1 and 0 (and display the integer), and then asks the user to

i need code in java please.
Task 2: Write a program that generates a random integer between 1 and 0 (and display the integer), and then asks the user to guess 1 or 0 (input 1 or 0). The game repeats 5 times. Compare the user input with the generated random number each time. Every time the user guesses it right, display "bingo".

Expert Answer


Program import java.util.Random; import java.util.Scanner; public class random_game { public static void main(String[] args) { Scanner input = new Scanner(System.in);
We have an Answer from Expert Buy This Answer $6