Sunday, October 25, 2020

C program to check whether the given year is a leap year or not

#include <stdio.h>

int main() {

    int y;

    printf("Enter a year:");

    scanf("%d",&y);

    if(y%4==0)

    {

        printf("%d is a leap year",y);

    }

    else

    {

        printf("%d is not a leap year",y);

    }

}

No comments:

Post a Comment

The Simple Habit That Helped Me Get Through My Hardest College Days ❤️

YouTube Video   Oh hi. So um today I would like to share um how I overcame from being sad or from being upset over my college time especiall...