LEAP YEAR OR NOT
Code :
#include<stdio.h>
int main()
{
int year;
printf("====================================\n");
printf("\tLEAP YEAR OR NOT\n");
printf("====================================\n");
printf("Enter Year : ");
scanf("%d", &year);
if(year%400==0 && (!year%100==0) || year%4==0 && (!year%100==0))
{
printf("\n\t%d Is Leap Year\n", year);
}
else
{
printf("\n\t%d Is Not Leap Year\n", year);
}
printf("------------------------------------\n");
return 0;
}
Come again Learn again !
< iCode Buzz />
No comments:
Post a Comment