Flowchart & C program to find whether agivern year is a Leap yr or NOT ?

 Flowchart :-

Program :-

#include<stdio.h>
#include<conio.h>                            
void main()
{ int year;
clrscr();
printf("Enter any year : ");
scanf("%d",&year);
if(year%100==0)
{ if(year%400==0)
printf("%d is a Leap Year.",year);
else
printf("%d is Not a leap year.",year);
}
else
{ if(year%4==0)
printf("%d is a Leap year.",year);
else
printf("%d is Not a leap year.",year);
}
getch();
}

Comments