• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The do…while Loop

The do…while loop executes its statements until a test condition evaluates to false. Unlike a while loop, the statements in the body of the do…while loop are executed at least once. Here’s the syntax of this loop:

do 
   statements 
while (condition) 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint