Question: Owner of a shop and a smart kiddo
Raj went to a shop to buy some chocolates along with his daughter. Raj picks one chocolate and ask the shop owner Durga to tell the price of that chocolate. So Durga says it as Integer 123. Then the kiddo who is along with Raj start saying to her dad that-“the amount to be paid is “One Hundred Twenty Three” in English words.
Assume shop owner givers a non-negetive integer price every time kiddo picks a new item in te shop. Write a program to help Raj to convert the integer to its English words representation. Given input is guaranteed to be less than 2^31-1.
Example 1:
Input: 321
Output: “Three Hundred Twenty One”
Example 2:
Input: 7654321
Output: “Seven Million Six Hundred Fifty Four Thousand Three Hundred Twenty One”