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

Samsung Galaxy S24 Motion Photo ❤️ | Turning Everyday Moments into Beautiful Memories

  https://www.youtube.com/watch?v=MZQ2V_Eqa7w So, this video is dedicated to let say Samsung since I am using S24. And you know the main thi...