Do While and While Loop

3,800 views

Published on

C# do while and while loop

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,800
On SlideShare
0
From Embeds
0
Number of Embeds
37
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Do While and While Loop

  1. 1. for loop => do while loop<br />int x = 5<br />x <= 10<br />x++<br />
  2. 2. An example<br />
  3. 3. for loop => while loop<br />int x = 5<br />x <= 10<br />x++<br />
  4. 4. An example<br />
  5. 5. Compare do while and while<br />Any difference?<br />
  6. 6. An example - while<br />
  7. 7. An example – do while<br />Will get executed at least once! <br />Because the check is at the end of the loop.<br />

×