#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr(); //to clear the screen
printf(“Enter any year(4-digit):”);
scanf(“%d”,&year);
if(year%100==0)
{
if(year%400==0)
printf(“Leap Year”);
}
else
if(year%4==0)
printf(“nLeep Year”);
else
printf(“nNot leap year”);
getch(); //to stop the screen
}
#include<conio.h>
void main()
{
int year;
clrscr(); //to clear the screen
printf(“Enter any year(4-digit):”);
scanf(“%d”,&year);
if(year%100==0)
{
if(year%400==0)
printf(“Leap Year”);
}
else
if(year%4==0)
printf(“nLeep Year”);
else
printf(“nNot leap year”);
getch(); //to stop the screen
}
0 comments:
Post a Comment