Mention types of loops and provide examples
Sigiloso
While Loop- In while loop, a condition is evaluated before processing a body of the loop. If a condition is true then and only then the body of a loop is executed. Do-While Loop In a do…while loop, the condition is always executed after the body of a loop. It is also called an exit-controlled loop. For Loop In a for loop, the initial value is performed only once, then the condition tests and compares the counter to a fixed value after each iteration, stopping the for loop when false is returned.