bsc

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

root / semester_1 / letusc / luc024.c

luc024.c (416B)


      1 /* Write a program using conditional operators to determine whether
      2 a year entered through the keyboard is a leap year or not. */
      3 /* Let Us C, Chap- 4, Page - 72, Qn No.: E(b) */
      4 
      5 #include <stdio.h>
      6 int main()
      7 {
      8     int year;
      9     printf("Enter the year : ");
     10     scanf("%d", &year);
     11     printf("\nYear %d is %s a Leapyear.", year, (year % 400 == 0 || year % 4 == 0 && year % 100 != 0) ? "" : "NOT");
     12     return 0;
     13 }
© 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