No such thing as 'if-loop', you can choose from: while (expression) statement for (expression; expression; expression) statement do statement while (expression)
The for loop is especially useful for flow control when you already know how many times you need to execute the statements in the loop's block. The for loop declaration has three main parts, besides...
Generally speaking a for loop looks like this: for(Initialization;condition;increment) { Do Stuff } whereas a while loop looks like this: while(condition) { Do Stuff } Before the while loop there...
for loop it consists of 3 parts 1. initialization 2. condition 3. incrementation like for(i=1;i<=10;i++).This loop executes 10 times. While loop: This is an entry check loop. First it checks for...