Saved Bookmarks
| 1. |
Write a program that convert the number (upto 3 digits) into words and speech. |
|
Answer» Answer: FOLLOWING is the implementation for the same. The code supports numbers up-to 4 digits, i.e., numbers from 0 to 9999. Idea is to CREATE arrays that store individual parts of OUTPUT strings. One array is used for single digits, one for numbers from 10 to 19, one for 20, 30, 40, 50, .. etc, and one for powers of 10. The given number is divided in two parts: first two digits and last two digits, and the two parts are printed separately. Explanation: follow me like my answer |
|