Oct 31, 2009 at 4:40pm UTC
On c--
you are decreasing the value of c by one. Once you reached the minimum value an int can have, its value would go to the maximum one
Oct 31, 2009 at 5:16pm UTC
Still don't quite understand. How to get num = 4?
Oct 31, 2009 at 6:57pm UTC
It would help if your question were more clear. What exactly are you trying to accomplish? As it is written now, you for loop will never execute.
Nov 1, 2009 at 2:35am UTC
I am figuring out line 7 ans which is 4.
Nov 1, 2009 at 6:07am UTC
The code you posted will output 2 as the result. If you're getting something else, either the code you posted is different than what you're running, or there's something strange going on with your compiler.
Nov 1, 2009 at 6:21am UTC
.....there is no loop going on since 3 >= 7 is a false statement
hence it should output 2 as the result