/*find a year is lear or not */
#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr();
printf("Enter a year : ");
scanf("%d",&year);
if(year%4==0 &&(year%100!=0 || year%400==0))
printf("This is leap year ");
else
printf("This is not leap year ");
getch();
}
No comments:
Post a Comment