for loop => do while loop<br />int x = 5<br />x <= 10<br />x++<br />
An example<br />
for loop => while loop<br />int x = 5<br />x <= 10<br />x++<br />
An example<br />
Compare do while and while<br />Any difference?<br />
An example - while<br />
An example – do while<br />Will get executed at least once!  <br />Because the check is at the end of the loop.<br />
Upcoming SlideShare
Loading in...5
×

Do While and While Loop

1,597

Published on

C# do while and while loop

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

  • Be the first to like this

No Downloads
Views
Total Views
1,597
On Slideshare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
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 />

×