post the errors you are getting
h3xc0de
Junior Poster in Training
70 posts since Feb 2009
Reputation Points: 29
Solved Threads: 12
You are trying to use `num' before initializing it i.e. providing it an initial value which works for member variables which have a default value but doesn't for local variables which don't.
Move the two statements which ask the user for input and parse `num' before the statement which first uses `num'.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734