24 May, 2022
Write a C program to find whether a given year is a leap year or not.
#include
Int main()
{
int year;
printf("Input a year :");
scanf("%d", &year);
if ((year % 400) == 0)
printf("%d is a leap year.\n", year);
else if ((year % 100) == 0)
printf("%d is a not leap year.\n", year);
else if ((year % 4) == 0)
printf("%d is a leap year.\n", year);
else
printf("%d is not a leap year \n", year);
return 0;
}
WorldTimeTech provides Top News,Education, Health Tips, Lifestyle, Science and Technology, Computer Help Tips and Unknown facts and also more and more. We Always Try to Give You Helpful Content to you. Thank You...
Copyright © 2025 WorldTimeTech.com. All Rights Reserved.