Find Error Chapter 5 6E of Starting Out With Java byGladdis
Find the errors in the following code.
3. // This code contains ERRORS!
Scanner keyboard = new Scanner(System.in);
int choice, num1, num2;
do
{
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? “);
System.out.print(“1 = yes, 0 = no “);
choice = keyboard.nextInt(); } while (Choice = 1)
Expert Answer
An answer will be send to you shortly. . . . .