Kodewick
Start learning →
Mini challenge←→0 / 70

Seat map

#025Mini challengeLoopsOutput6 min

The small cinema has rows A, B and C, with seats 1 to 4 in each. The outer loop already goes row by row (a char can ++ too) and ends each row with a newline. Inside it, write another loop that shows the row's seats as [A1][A2][A3][A4].

Should show
[A1][A2][A3][A4]
[B1][B2][B3][B4]
[C1][C2][C3][C4]
main.c
#include <stdio.h>

int main(void) {
    for (char row = 'A'; row <= 'C'; row++) {
        // your code here: another loop: seat from 1 to 4, showing [row seat]
        printf("\n");
    }
    return 0;
}
Ctrl + Enter runs too
Result

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