Idea

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jun 2009
Posts: 830
Reputation: wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all 
Solved Threads: 94
wildgoose's Avatar
wildgoose wildgoose is offline Offline
Practically a Posting Shark

Re: Idea

 
0
  #31
Jun 28th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 212
Reputation: MrNoob has a little shameless behaviour in the past 
Solved Threads: 6
MrNoob's Avatar
MrNoob MrNoob is offline Offline
Posting Whiz in Training

Re: Idea

 
0
  #32
Jun 28th, 2009
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?
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 212
Reputation: MrNoob has a little shameless behaviour in the past 
Solved Threads: 6
MrNoob's Avatar
MrNoob MrNoob is offline Offline
Posting Whiz in Training

Re: Idea

 
0
  #33
Jun 28th, 2009
either than that i understand it all
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 212
Reputation: MrNoob has a little shameless behaviour in the past 
Solved Threads: 6
MrNoob's Avatar
MrNoob MrNoob is offline Offline
Posting Whiz in Training

Re: Idea

 
0
  #34
Jun 28th, 2009
shoudlnt it be like this "%s %s %s\n",string[i],string[28],string[num]); ?
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 830
Reputation: wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all 
Solved Threads: 94
wildgoose's Avatar
wildgoose wildgoose is offline Offline
Practically a Posting Shark

Re: Idea

 
0
  #35
Jun 28th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 212
Reputation: MrNoob has a little shameless behaviour in the past 
Solved Threads: 6
MrNoob's Avatar
MrNoob MrNoob is offline Offline
Posting Whiz in Training

Re: Idea

 
0
  #36
Jun 28th, 2009
oh thanks
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 3
Reputation: Anjoe18_Edica is an unknown quantity at this point 
Solved Threads: 0
Anjoe18_Edica Anjoe18_Edica is offline Offline
Newbie Poster

Re: Idea

 
0
  #37
Sep 18th, 2009
Originally Posted by MrNoob View Post
shoudlnt it be like this "%s %s %s\n",string[i],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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum


Views: 1339 | Replies: 36
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC