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.
Leap year
#include <iostream>
using namespace std;
int main() {
int year = 2024;
// your code here: decide whether year is a leap year
return 0;
}
Run tries the examples. When they look right, Submit.