Kodewick
Start learning →
Mini challenge←→0 / 86

Leap Year

#076Mini challenge(y % 4 == 0 && y % 100 != 0) || y % 400 == 05 min

The rule has three parts: a year divisible by 4 is a leap year; except one divisible by 100, which is not; except one divisible by 400, which is after all. Show Leap year or Common year. Here the year is 2024.

Should show
Leap year
main.cpp
#include <iostream>
using namespace std;

int main() {
    int year = 2024;
    // your code here: decide whether year is a leap year
    return 0;
}
Ctrl + Enter runs too
Result

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