Header Ads

The Loop Control Structure

                                              The Loop Control Structure 



  • The While Loop 
  • The For Loop 
  • The do-while Loop
  • The Odd Loop

1-The While Loop:It is often the case in programming that you want to do something a fixed number of times.



2-The For Loop:Perhaps one reason why few programmers use while is that they are too busy using the for.



3-The do-while Loop:The do-while Loop looks like this :
                              
                                           do
                                         { 

                                             this ;
                                             and this; 
                                             and this;
                                             and this;
                                             and this;
                                                              }while (this condition is true);





4-The Odd Loop:The loops that we have used so far executed the statements within them a finite number of times .    




                                   





                                                                 




No comments

Theme images by sebastian-julian. Powered by Blogger.