Leap Year

Leap Year

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn C programming concepts. You can learn C language at your own speed and time. One can learn concepts of C language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

Leap Year
Leap Year

Write a C program to Leap Year

PROGRAM: Leap Year

/* Check Leap Year */
#include<stdio.h>
int main()
{
    int y;
    printf(“Enter a year: “);
    scanf(“%d”,&y);
    if(y%4==0)
        printf(“Leap Year”);
    else
        printf(“Not a Leap Year”);
   return 0;
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *