Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Find reliable answers to your questions from a wide community of knowledgeable experts on our user-friendly Q&A platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly 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"