Kodewick
Start learning →
Starter←→0 / 70

The odd side

#022StarterLoopsConditions3 min

Today the postman only delivers to the odd side of the street. The loop walks past house numbers 1 to 10; show only the odd ones, one per line.

Should show
1
3
5
7
9
main.c
#include <stdio.h>

int main(void) {
    for (int h = 1; h <= 10; h++) {
        // your code here: if h is odd, show it
    }
    return 0;
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.