Question: Need help with this Java Code trying to input it in eclipse. Why isnt my Java code not working??? Red X for my Scanner in

Need help with this Java Code trying to input it in eclipse. Why isnt my Java code not working??? Red "X" for my
Scanner in = new Scanner(System.in)
 Need help with this Java Code trying to input it in
eclipse. Why isnt my Java code not working??? Red "X" for my

cc bend-bb backboard com Chapter 2 Assignment Chap 2 Assignment. Using the contents from this chapter, write a program to manipulate a number using the Decimal Systern and determine each denomination Remember to properly declare the variables. Output of program is shown below Part & Allow user to enter a number (range 1-9999 Part ll: Print the number entered. Partill Determine how my thousands there are in the entered number, how many hundreds, how many tens, and how many ones. Print out each denomination. Sample output Please enter a number from 0-9999 7139 You entered: 7139 Results Thousand(s: 7 Hundredis);: 1 Tens): 3 Comments and heading for program (S points) allow user to enter a number (1-9999) (5 points) properly saving number for processing (10 points) correct accuracy in determining each denomination (10 points) printing out correctly showlisting in Sample, Note what is to be printed expected. Five points can be taken off if no comments and/or "messy looking program 5 .Assignment3-java public class Assignnent3 13 14 t 15 16 17 I1 print below is my Assignment3 18 19 20e public static void main(Stringll args) 23 324 Scanner in new Scanner(System.in); 25 26 27 28 29 30 31 32 System.out.print ("Enter a number(1-9999):"); int num = in.nextint ( ); int thousands num/1000; int hundreds (nums1000)/100; int tens = (num%100)/10; int ones (num%10); 34 35 36 37 38System. out.print In("Thousandis): "+ thousands); 39 48 System. out.println("Hundred(s): "+ hundreds): System.out.print In('Ten(s): "t tens); 42 44 System-out.print In("One(s): "- ones) 47 Pr EHES E E mad.itili.D lii ation Console X cterminatedx Chap2Project Java Application) /Library Java/JavaVirtualMachines/idk 11 0 2 jdk/Cont Exception in thread "main" java. tang Error: Unresolved compitation problem Syn tax error on token Himport assert expected

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!