Question: how to fix the java code? convert the number into the word the range i want is 0-999 and put -1 will stop the program.
how to fix the java code?
convert the number into the word
the range i want is 0-999 and put -1 will stop the program.

public class NumberTcwords public static void nein(Stringl1 args) ( seventy', "eighty .eight', twenty, "thirty" fourty","fifty" "sixty 'ninty "nine.' String[] tens { String[] units= { zero", "one-, String word System.out.print( Number: ") int nun -In.nextint tno" "three.' .four", "five", "six", .seven.' ten-, "eleven-, twelve", thirteen . , fourteen", "fifteen . , "sixteen "seventeen "eighteen-, "ninte , while(nun-1) int hundred num 138 int ten . num/ 10%18 int unit num%18 num-19)( Systen . out.println(tens[ten] " + units[unit]); Systen.out.print1n("Nunber : ); nun In.nextIntO: elset Systen.out.printin (units[nun]) System.out.printlnNumber:) nun-In.nextInt) f (num-0) System.out.printin(word) System.out.printin("Number): num 1n.nextInt()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
