Search Results

Showing results 1 to 7 of 7
Search took 0.04 seconds.
Search: Posts Made By: Infarction ; Forum: C and child forums
Forum: C Apr 7th, 2007
Replies: 10
Views: 5,886
Posted By Infarction
Actually, according to this very enlightening read (http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx), you're all wrong...

(sorry, I couldn't help it either) :mrgreen:
Forum: C Apr 1st, 2007
Replies: 10
Solved: Stack in C
Views: 9,013
Posted By Infarction
I don't think you even need Top3 (and you're using it uninitialized, which is bad). Top will be updated as you call pop, so you could probably just do:
while(Top)
pop(Top);
Forum: C Apr 1st, 2007
Replies: 10
Solved: Stack in C
Views: 9,013
Posted By Infarction
I tried running it and after a few small touchups (no logical changes though) it seems that you're off to a good start. Here's how it went:
$ ./a.out
this is a line

enil a si siht As you can...
Forum: C Mar 31st, 2007
Replies: 10
Solved: very large ints
Views: 1,307
Posted By Infarction
You'll need a bignum library. I've seen mention of the Gnu Multiple Precision (http://gmplib.org/) library before, so you might give that a shot.
Forum: C Mar 26th, 2007
Replies: 4
Views: 2,264
Posted By Infarction
Instead of giving a book answer, I figured I'd help you help yourself: did you try it? You can learn a lot just from experimenting and seeing if something works or not.
Forum: C Mar 8th, 2007
Replies: 21
Views: 5,797
Posted By Infarction
Actually, my brain wasn't really functioning either, now that I look at it. The no-brainer algorithm we all jumped on works so long as the coins are multiples of each other, or have a fairly high...
Forum: C Mar 8th, 2007
Replies: 21
Views: 5,797
Posted By Infarction
To summarize the algorithm provided by Lazarus, you just add as many of the biggest coin you can. Then repeat for the next biggest until you have the amount.
Showing results 1 to 7 of 7

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC