Our company wants to create a data entry verification system. Given an amount in words and an amount indicated by data entry person in numbers, you have to detect whether the amounts are the same or not.Note
- There are a lot of corner cases to be considered. The interviewer expects you to take care of them.
- Every word needs to be separated using "-" rather than a space character https://en.wikipedia.org/wiki/Indian_numbering_system
- "Use Expected Output option" to clear further doubts.
1 <= |A| <= 9Input Format
1 <= |B| <= 100
String num: Amount written in digits as a string. This string will be an integer number without having any commas in between the digits.Output Format
String words: Amount written in words according to Indian Numbering System.
An integerExample Input
1: Values match
String num = "1234"Example Output
String words = "one-thousand-two-hundred-and-thirty-four"
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified.
Still have a question? Checkout Sample Codes for more details.