Skip to main content

Leap Year

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int year;
printf("Enter a Year:");
scanf("%d",&year);

if(year%4==0)                                                         //% is used to find remainder
printf("Entered Year is a Leap");
else
printf("Entered Year is not a Leap Year");

getch();
}

Comments

Popular posts from this blog