Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago