View Single Post
Old Sep 29th, 2007, 10:05 AM   #3
Resident Grouch
DaWei's Avatar
Join Date: Jun 2005
Posts: 8,368
Rep Power: 22 DaWei will become famous soon enoughDaWei will become famous soon enough
First of all, pick some small number like 3 or 5 or something, and go through your code, working it out by hand. After you've done that and fixed your code, then ask yourself what happens if the user enters -12 at the first prompt.
Contributor's Corner:
Politically Incorrect
DaWei on Pointers
DaWei is offline   Reply With Quote