Fundamentals6 / 16
Up next

for loop

#include <stdio.h>

int main(void) {
    int total = 0;
    for (int i = 1; i <= 4; i++) {
        total += i;
    }
    printf("%d\n", total);
    return 0;
}
What you're solving

declare the counter in the header