What are way to use while loop

Showing Answers 1 - 2 of 2 Answers

M. PAVAN KUMAR REDDY

  • Jan 30th, 2007
 

'while' loop can be used in two waysEntry controlled loop like:while(condition){ ...... ..... .....}In this case, the condition is checked before entering the loop. If the condition is false, the statements in the loop will not be executed at all.Exit controlled loop like:do{ ..... ..... .....}while(condition);.In this case, the condition is checked after executiing all the statements in the loop. Even if the condition is false, the statements in the loop will be executed once.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions