answersLogoWhite

0


Best Answer

Easy: if-else is not a loop; while, for and do-while are loops.

if-else just run once, but do-while run many times.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between if and while loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between a do while loop and a for loop in c?

the counter variable cannot be initialized in while loop before entering into the block.


What is the Difference between while and do while?

Both are programming commands. A do/while loop will execute at least once. A while loop may not execute at all.


Difference between for and while loop not in syntactically?

Well 'while' goes like this: while (condition) statement 'for': for (initialize; condition; after-each-loop) statement


Is a while loop or a for loop faster?

No difference.


What is the difference between while loop and for loop in oracle?

You mean PL/SQL? Well, they are different things, read the manual for details.


What is the difference between do and while loops in c?

the main difference b/w do and while loops is that do loop will run atleast once even if condition is not satisfied but while loop will not execute even once if condition is not satisfied . this is bcoz in do loop condition is checked after one execution but in while condition is prechecked.


Difference between while and do while loops in java?

The most important differences are: a. The while loop starts with a condition whereas the condition is the line of code in case of a do while loop b. The do while loop is guaranteed to run the loop body atleast once even if the condition is an impossible to satisfy but such a guarantee is not available with the normal while loop


Open loop and close loop system in injection moluld machine?

loop checking is perform before cable termination..the difference between a close loop and open loop is,tha close loop has a feedback while the open loop has not.


What is the difference between while dowhile?

While: If we can use while statement it will check the condition then proceed further loop statement.DoWhile: If we use dowhile, first execute loop statement then check the condition.


What the difference between pretest loop and posttest loops?

The difference is that pre means before and post means after in Latin so it's tested before or after. :)


What is the difference between while loop and for loop in matlab?

A while loop executes code inside the while block continuously until the said condition is not true. A for loop contains three parts. The first part is carried out prior to the for loop, the middle part is executed by the for loop until it is no longer true, and the final part is performed at the end of each go round of the loop.


What is difference between while and dowhile?

the test condition will be checked first after wards the body of the loop will be excuted in while statement and the the do while statement represented the body of the loop will be executed first and then the test condition will checked next