0
379views
Write a program to read a year as an input and find whether it is a LEAP YEAR or not.
1 Answer
0
5views

Program

  #include <stdio.h>
#include<conio.h>

void main()
{
    int year;
    printf("Enter the Year:");
    scanf("%d",&year);
    if(year%4==0 && year%100!=0 || year%100==0 && year%400 ==0)
    printf("Leap Year");
    else
    printf("Not a Leap Year");
}

enter image description here

enter image description here

Please log in to add an answer.