hello sir.. I am not being able to make a program that accepts any number and displays it in words.... for example: when user enter 3456 then output should be three thousand four hundred fifty six.... 12 then print twelve.....9 then print nine...and so on....

If I tell u the algorithm then will u be able to implement the program?? I hope u will...let me explain the algo.. For solving such kind of problems u need to define several functions:- digit_count():- this function will count the number of digits of a number... one_digit(), two_digit(), three_digit(), four_digit() etc etc would be the functions which will give u the required string depending upon the number of digits.. After counting the number of digits you need to pass the number to the actual function among the above defined functions.. You also need to define the separate function for extrating the most significant number of a number... like if a number is 21..u need to extract 2 out of 21...if the number is 321..u need to split the number to 3 and 21... Now, in the functions one_digit(),two_digit().....u will have 9 cases. for example:- if the number is 1 digit u need to pass it to one_digit() and u will get different words for each number for 1 to 9...so u need 9 cases... Now,consider the number is of two digits (say 21)..then the number is passed to two_digit() and then inside operations is done to extract MSD i.e 2 and the 1 is again passed to one_digit...for each MSD u need to again define 9 cases from twenty for 2 to ninety for 9...additionally u need to define separate cases for special ones like eleven to nineteen....keep on continuing like this with ur algorithm..always remember that three_digit() will call two_digit() and two_digit() will call one_digit()...i mean the highest digits functions will utilize lower digit functions..... get back if you still have any issues..