int num;int total = 0;System.out.println(“Enter a number fro…
int num;int total = 0;System.out.println(“Enter a number from 1 to 10: “);num = keyboard.nextInt();switch (num){ case 1: case 2: total = 5; case 3: total = 10; case 4: total = total + 3; case 8: total = total + 6; default: total = total + 4;}System.out.println(total);What is the output of the code if the user enters 4 from the keyboard?
Read Details