In this video, we're going to execute equivalent For loop and While loop code. A for loop is sometimes called syntactic sugar because it allows you to write a more compact code for counting, a common programming idiom. Let's look at their similar anatomy, both have an initialization statement. In the for loop, it follows the for keyword and then the equivalent while loop, it is just before the beginning of the while loop. The conditional expression is the second piece, following the for keyword and the piece inside parentheses after the while keyword. The increment statement is the third piece following the for keyword but an equivalent while loop would increment inside the loop body just before the close curly brackets. Finally, any statements that happen in the body of the for loop could also happen in a while loop before the increment statement. Let's see these two equivalent loops in action. As always, we begin with our execution arrow inside main. We initialize y to one and n to three. Now, the syntax of the for loop has the int i = 1 initialization just after the for keyword, so we'll pause the execution arrow there as the while execution arrow on the right enters the open curly brace and initializes i, changing the state of our program in the same way. The purpose of the curly braces is subtle. Since scope of variable i is limited to the for loop, the curly braces restrict the scope of variable i to this box. Otherwise, its scope would be the whole main function and it would not be equivalent to the for loop version. Looking at the conditional expression, we see 1 < 3 is true, so we enter the loop and begin executing statements there. Y times i is 1 times 1 which is 1. Next, we'll increment i to 2 and return to the top of the loop. Checking the conditional expression 2 < 3 is true, so we enter the loop and evaluate y times i which is 1 times 2, assigning 2 to y. We'll increment i to 3 and return to the top of the loop, 3 < 3 is false, so we move the execution arrow to just after the loop. Respecting the scope of i in the for loop, we also exit the curly brace after the while loop, destroying the box for i since it is now out of scope. Finally, we return zero and exit main.