source file name: Leap.C
void main()
{
int y;
clrscr();
printf("\n enter any 4 digit no as year: \n");
scanf("%d",&y);
if(y%4==0)
printf("\n given year no is leap year");
else
printf("\n given year no is not leap year");
getch();
}
output:
source file name: Leap.C
void main()
{
int y;
clrscr();
printf("\n enter any 4 digit no as year: \n");
scanf("%d",&y);
if(y%4==0)
printf("\n given year no is leap year");
else
printf("\n given year no is not leap year");
getch();
}
output:
0 Comments
Post a Comment