"else if" is only executed, when "if" is false.
10 is smaller than 20
10 is greater than 6
the "if" is true and no other statement in the "if"-statement are checked.
Please use proper tags:
Included the programming language in the tags.
Do not use unneccessary tags like "help" and "asap"
Please start a new thread for every question
the code will executes continue;
Continue jumps out of the while and does not decrease num--
So num stays 3
It comes in another iteration and the same repeats.
Here you have created a infinite loops
Personally I do not use continue because of this behaviour.
You can do this with just for-loops, while-loops and if-statement
if (num == 3)
num--; //decraese num before continue
I do prefer this one
if (num != 3)
//sneeze //jay Thank you,guys for helping me out its quite generous of you.
Regarding the double post.I am sorry as I am new to this forum,so I'm not familiar with the protocols.
I respect your decision I will not do that again.