Conditions and loops
Conditions and loops look like this in C (braces mark the block, indentation is just style):
if (x > 10) {
printf("big\n");
} else {
printf("small\n");
}
for (int i = 0; i < 5; i++) {
printf("%d\n", i);
}
while (n > 0) {
n--;
}
Try it
Print the even numbers from 2 to 10 on a single line, separated by spaces:
2 4 6 8 10