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

From Lifting Light Weights to Building Confidence 💪 | My Fitness Journey ✨

  https://www.youtube.com/watch?v=nyX7g3GRGDw Hi, namaste Kam. So I had to make this video about how I joined the gym and it did made a grea...