P024.c (671B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* WAP to check whether a year is leapyear or not. */ 8 // This code has not been compiled. 9 // If you find any issues, please create a new issue on GitHub regarding them. 10 11 #include <stdio.h> 12 int main() 13 { 14 int year; 15 printf("Enter the year : "); 16 scanf("%d", &year); 17 if (year % 4 == 0 && year % 100 != 0) 18 printf("\nYear %d is a leapyear.", year); 19 else if (year % 400 == 0) 20 printf("\nYear %d is a leapyear (Century).", year); 21 else 22 printf("\nYear %d is not a leapyear.", year); 23 return 0; 24 }