none
none
Last edited by dionys; 05-08-2004 at 07:42 PM.
Code:void TransformDigitsToLetters(int n,char str[]) { /* take the first 2 digits (and save them as 14 */ char* test[2]; int digits; /* "take first 2 digits", actually the last two digits: 11'14'*/ digits = n%100; /* save them as fourteen */ if(digits != 0){ if(digits < 20); test[0] = numbers[digits -1]; else { test[1] = tens[digits/10 - 1]; if(digits%10 != 0) test[0] = numbers[digits%10 - 1] } }
Last edited by zuiplap; 05-08-2004 at 07:58 AM.
Aside from posting a function that doesn't compile, you forgot to explain what part of the problem you're trying to help with. Something as simple as "Here is a function which converts numbers less than 100 to words. Modifying it for larger numbers isn't that hard once you have this," would do nicely.Originally Posted by zuiplap