Kodewick
Start learning →
Starter←→0 / 70

Noodle timer

#018StarterLoops2 min

Instant noodles need 3 minutes. The loop already counts from 3 down to 1; show one line each time round, like 3 min left. The Ready! at the end is already there.

Should show
3 min left
2 min left
1 min left
Ready!
main.c
#include <stdio.h>

int main(void) {
    for (int m = 3; m >= 1; m--) {
        // your code here: printf how many minutes are left
    }
    printf("Ready!\n");
    return 0;
}
Ctrl + Enter runs too
Result

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