Find the errors in the following code.
// This code contains ERRORS!// It adds two numbers entered by the user.int num1, num2;String input;char again;Scanner keyboard = new Scanner(System.in);while (again == 'y' || again == 'Y') System.out.print("Enter a number: "); num1 = keyboard.nextInt(); System.out.print("Enter another number: "; num2 = keyboard.nextInt(); System.out.println("Their sum is" + (num1 + num2)); System.out.println("Do you want to do this again? "); keyboard.nextLine(); // Consume remaining newline input = keyboard.nextLine(); again = input.charAt(0);
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.