- Program :
int main()
{
int year;
printf("\n----------------LEAP YEAR OR NOT----------------");
printf("Enter a year: ");
scanf("%d", &year);
if(year%4==0)
{
printf("%d is a leap year.", year);
else
printf("%d is not a leap year.", year);
}
return 0;
}
- Output :
No comments:
Post a Comment