Question: why I nave error. in each. line when I write. the same answer for java code import java.util.Scanner; public class Hil3_problemi_Esam { public static void

why I nave error. in each. line when I write. the same answer for java code

why I nave error. in each. line when I write. the same

import java.util.Scanner; public class Hil3_problemi_Esam { public static void main(String[] args) O Scanner sc = new Scanner(System.in); II ask user to input number of books System.out.println("How many Books did you buy: "); int count = sc.nextInt(); // checking for negative values if (count) { System.out.println("Invalid input."); return; } Il Display correct points according to number of books switch(count) case 1: System.out.println("you.earn 0 points. ".): case 1: System.out.println("you earn.5 points."): case 2: Systen.out.println("you earn. 15. points."): case 3: System.out.println("you, earn 30..points."); default: System.out.println("you earn 60 points."); } 42 44} RE 39M

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!