Check Whether a Year is a Leap Year or Not

PHOTO EMBED

Thu Nov 30 2023 17:55:01 GMT+0000 (Coordinated Universal Time)

Saved by @nistha_jnn #c++

int main()
{
    int year;

    year=2000;

    if(year % 400 == 0)
        cout << year << " is a Leap Year";
        
    else if(year % 4 == 0  && year % 100 != 0)
        cout << year << " is a Leap Year";
        
    else
        cout << year << " is not a Leap Year";
    
    return 0;
}
content_copyCOPY

https://prepinsta.com/cpp-program/cpp-program-to-check-whether-a-year-is-a-leap-year-or-not/