Powered By Blogger

Feb 11, 2025

12. Check Leap Year

 #include <stdio.h>

int main() {

    int year;

    printf("Enter a year: ");

    scanf("%d", &year);

    if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))

        printf("Leap Year\n");

    else

        printf("Not a Leap Year\n");

    return 0;

}


No comments:

Post a Comment

Featured Post

Data Analysis

    What is data analysis and its significance?   Data analysis is the process of collecting, transforming, and organizing data to dr...

Popular Posts