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

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

if is an conditional non iterative statement but while ia an conditional iterative statement

This answer is:
User Avatar

Add your answer:

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

What is the difference between if and while loop?

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.


List out the differences between while and dowhile statement?

The do ..while loop is executed at least once, whereas the while loop may not be executed even once.


What are the differences between Do While and For loops in C?

In short, a for loop declares an variable and assigns it a value, has an argument, and has an update. A while loop only has an argument. More Detail... in C++, which is very close to C an example while loop is; while(i


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


What are the differences between while and do while?

while- It will wrok only if the condition is correct if not it wont excute the body of the loop do-while: In some cases we want that body of the loop and the condition may fails so the loop want to print so the do while loop first excute body of the loop and next it checks the condition it continues until the condition becomes false


What are the differences between iterations and loops in progamming?

A loop will loop for n iterations. Each times the program executes the code in the loop is an iteration.


C program to print numbers 1 to n?

how do we use loops in c plus plus programing and what are basic differences between do,for and while loop


What are the 3 differences between for and while loop?

For Loop:1.In this first it initialized with the starting value such as I=0,count=0.The value which was initialized is then checked with the given test condition. While Loop:1.In this it checks the condition first. for Loop:2.In this we initializ,check conition and increment or dicrement in one statement While loop2:In this only we can test the condition in one statements. For Loop3:general Format: for (initialization; test condition; increment) { body of the loop } While loop:3.general Format while(test condition) { body of the loop }


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.


Tell 2 or 3 differences in table manner of differences between for and while loops?

Both For and While loops are available for the purpose of executing a piece of java code repeatedly until a particular condition is met. The only difference being - the loop condition/counter has to be modified inside the while loop every time whereas the condition is integrated in the for loop definition. Otherwise both the loops are exactly same in all aspects.


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.


How do you convert a while loop to do-while loop?

A for loop is classified as an iteration statement. A simple example might be... For x = 1 To 10 'loop body Next x The same loop expressed as a while loop (classified as a control flow statement) could be... x = 0 Do While x < 11 'loop body x = x + 1 Loop .