bsc

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

luc024.c (552B)


      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 /* Write a program using conditional operators to determine whether
      8 a year entered through the keyboard is a leap year or not. */
      9 /* Let Us C, Chap- 4, Page - 72, Qn No.: E(b) */
     10 
     11 #include <stdio.h>
     12 int main()
     13 {
     14     int year;
     15     printf("Enter the year : ");
     16     scanf("%d", &year);
     17     printf("\nYear %d is %s a Leapyear.", year, (year % 400 == 0 || year % 4 == 0 && year % 100 != 0) ? "" : "NOT");
     18     return 0;
     19 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror