Find the best solutions to your questions at Westonci.ca, the premier Q&A platform with a community of knowledgeable experts. Get quick and reliable solutions to your questions from knowledgeable professionals on our comprehensive Q&A platform. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

In Java
The int t contains an integer between 1 and 50 (inclusive). Write code that outputs the number in words and stores the result in the String inwords. For example, if t is 35 then inwords should contain "thirty five"

int t = 2
String inword;

Test Cases

Test case #1 Expected result: When t is 2, your code sets inwords to "two"
Test case #2 Expected result: When t is 50, your code sets inwords to "fifty"
Test case #3 Expected result: When t is 37, your code set inwords to "thirty seven"
Test case #4 Expected result: When t is 16, your code sets inwords to "sixteen"