#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr();
printf("\n Enter the year");
scanf("%d",&year);
(( year % 100 ==0 && year % 400 == 0) || (year % 100 !=0 && year % 4 == 0))?
printf("\n Year %d is leap ",year):printf("\n Year %d is not leap ",year);
getch();
}
#include<conio.h>
void main()
{
int year;
clrscr();
printf("\n Enter the year");
scanf("%d",&year);
(( year % 100 ==0 && year % 400 == 0) || (year % 100 !=0 && year % 4 == 0))?
printf("\n Year %d is leap ",year):printf("\n Year %d is not leap ",year);
getch();
}
No comments:
Post a Comment