![While Loop: Pre-Tested Loop While Loop Pre Tested Loop Sourav Purkait 2](https://tcmblog.tcmstunner.com/wp-content/uploads/2023/07/While-Loop_-Pre-Tested-Loop-Sourav-Purkait-2-600x400.webp)
While Loop: Pre-Tested Loop
Introduction: While loop is a a pre-test loop, it first test a special conditional expression and as long as conditional expression is true , loop body statement will be executed. Syntax: while (condition) { //statement; incr/decr; } Flow chart: Step 1: In the execution flow, first initialized the value. Step 2: After initialized the value…