0
Java
If the user gives us a numer like 5 how does it complies to a word " five"
4 Answers
+ 1
You can use a String array:
String[] word = {"one", "two", ... , "nine"};
int number = 5;
System.out.println (word [number -1]; //array index starts at 0
Output: five
+ 2
You could use a simple switch statement...
https://code.sololearn.com/cjekXqKw5gEN/?ref=app
+ 1
Denise thankyou for your help dear!!
+ 1
The One True Morty Thank you