Loopings in C++

In the previous section, Conditional statements, we learned how to direct the flow of a program through the use of IF, ELSE, and SWITCH, which are also called selection structures.

Now, let's learn how to use repeating structures, also known as loops or loopings.

With them, we will allow our programs to repeat certain code snippets as much as we like. And this is absurdly common, widely used in the computer world.

We will learn how to use loopings:
  1. while
  2. do while
  3. for

Repetition Statements

  1. Operators of Assignment, Increment and Decrement
  2. WHILE loop
  3. DO WHILE looping
  4. FOR repetition statement
  5. Multiplication table with FOR, WHILE and DO WHILE
  6. Summation and Factorial
  7. Fibonacci series
  8. Exponentiation with loopings in C++
  9. Nested loopings
    Powerball lottery
  10. break and continue statements
  11. Prime numbers in C++
  12. Loopings exercises

No comments:

Post a Comment