In Scratch, a repeat loop looks like this
A for loop in C looks like this
for (i = 0; i < 5; i++)
{
printf("%d: Whee, this is fun!\n", i);
}
At the top of the loop is a statement with three parts separated by semicolons. The first part is the initial condition "i = 0". This means we will start executing the loop by setting the value of variable i to 0. The second part is a conditional expression. If this expression evaluates true, we will execute the body of the loop, otherwise we are done with the loop and execution will continue on the statement that follows the loop. The last part is a bit of code that runs every time we reach the end of the loop. In this case it says "i++", so the value of i will be incremented every time we get to the bottom of the loop.
The body of the loop appears between the braces. This code block will execute every time the conditional expression evaluates as true.
Here's the same loop in PICO-8
...and here's the output