Question: Write a function that takes as input a non-negative integer in the range 0 to 99 and returns the English word(s) for the number

Write a function that takes as input a non-negative integer in the range 0 to 99 and returns the English word(s) for the number as a string. Multiple words should be separated by a space. If the input exceeds 99, the function should throw an invalid argument exception. The function declaration is: I string number_words(unsigned int n); Examples "thirteen" "forty two". 1. 0 "zero" 2. 13 3.42 4.70 5. 121 - "seventy" std::invalid argument
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
