all types of loops in c++ code example Example: loop types 1-For (for each) 2-While Loop 3-Do-While loop