bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / tuition-c / P024.c

P024.c (535B)


      1 /* WAP to check whether a year is leapyear or not. */
      2 // This code has not been compiled. 
      3 // If you find any issues, please create a new issue on GitHub regarding them.
      4 
      5 #include <stdio.h>
      6 int main()
      7 {
      8     int year;
      9     printf("Enter the year : ");
     10     scanf("%d", &year);
     11     if (year % 4 == 0 && year % 100 != 0)
     12         printf("\nYear %d is a leapyear.", year);
     13     else if (year % 400 == 0)
     14         printf("\nYear %d is a leapyear (Century).", year);
     15     else
     16         printf("\nYear %d is not a leapyear.", year);
     17     return 0;
     18 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror