I've been working in a program in order to complete Project Euler's problem 17 and I tried to do it in C. Problem:
If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.
If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used?
I wrote a function that puts all the numbers between 1 and 1000 in words and into an array with 1001 elements (the last is NULL for iteration). But I'm having trouble when I try to count the number of chars in every element of the string, because I don't know how to do it. Can someone give me a little help?