Kodewick
Start learning →
Starter←→0 / 70

Microwave timer

#045StarterFunctions2 min

The microwave only takes seconds. Write to_seconds(minutes, seconds) to turn minutes and seconds into the total seconds: 1 minute 30 seconds is 90.

Examples
to_seconds(1, 30)→90
to_seconds(0, 45)→45
The functionint to_seconds(int minutes, int seconds)
main.c
int to_seconds(int minutes, int seconds) {
    int total = 0;
    // your code here: total is the minutes times 60, plus the seconds
    return total;
}
Ctrl + Enter runs too
Result

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