So what I posted should theoretically handle 0 to 999
nine hundred ninety-nine

0 to 9,999 isn't to hard either.
Above that you can handle with a resursion
nine hundred ninety-nine thousand nine hundred ninety-nine

thanks mate but there 1 thing i dont understand when you sprintf the num whish is bigger than 100 it should like print 2 variables not 3 ? how it printed 3?

either than that i understand it all

shoudlnt it be like this "%s %s %s\n",string,string[28],string[num]); ?

You are breaking down your number into its component parts then re-assembling the ASCII into a string.

There are many ways to write the same program.

All the $printf() functions return the length of bytes built.
i = printf()
i = sprintf()
i = fprintf()
i = vprintf()
etc.
That's why I use the return addition onto the base pointer to advance it for the next parse.

You can build your strings in one line but I merely concatenate the new strings onto the end.

Also you don't want "thirty zero"
But you do want "thirty-one"

Also note that written 10's requires a hyphen between it and the one's.

oh thanks

shoudlnt it be like this "%s %s %s\n",string,string[28],string[num]); ?

hlow can u help me?
about Zodiac sign ?here is the the output :
sample output
Enter Name:Anjoe
Enter Birthyear:02/08/92
name:Anjoe
age:17
Zodiac sign:tiger
using array,modulo,&looping statement instructor said

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.