View Single Post
Old Feb 17th, 2005, 12:10 PM   #6
Hockeyman
Programmer
 
Hockeyman's Avatar
 
Join Date: Jan 2005
Location: Vancouver, Canada
Posts: 60
Rep Power: 4 Hockeyman is on a distinguished road
Send a message via MSN to Hockeyman
how did you declare your variable "value"?

Another thing I've just noticed - you have in your printf for the user to enter a number or a name - but your scanf isn't set up to read strings. If they enter a full name, it'll just read the first character and leave the rest in the input buffer. You can fix it by asking the user to enter a number or a letter (easiest), or declaring value as a string and using %s in scanf to read (trickier).
__________________
~ You know, Hobbes, some days even my lucky rocketship underpants don't help. ~


Last edited by Hockeyman; Feb 17th, 2005 at 12:18 PM.
Hockeyman is offline   Reply With Quote