Showing posts with label Program to find that entered year is leap year or not.. Show all posts
Showing posts with label Program to find that entered year is leap year or not.. Show all posts

leap year or not.

Program to find that entered year is leap year or not.

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf(“enter any year: ”);
scanf(“%d”,&n);
if(n%4==0)
printf(“year is a leap year”);
else
printf(“year is not a leap year”);
getch();
}
Output:
enter any year: 1947
year is not a leap year