programming9
  • Flowcharts
  • Programs
      • Back
      • C Programs
      • C++ Programs
      • Java Programs
      • Python Codes
      • HTML Codes
      • Java Script Codes
      • SQL Codes
  • Tutorials
      • Back
      • Java Tutorials
      • Competitive Programming
      • Python Tutorials
      • C Programming
  • Blog
  • Login

C Program to Check the Leap Year

Details
Written by: RajaSekhar
Category: C Programs
  • basic c programs
  • leap year program in c
#include<stdio.h>
void main(){
    int year;

    printf("Enter Year : ");
    scanf("%d",&year);

    if(((year%4==0)&&(year%100!=0))||(year%400==0))
         printf("%d is a Leap Year",year);
    else
         printf("%d is not a Leap Year",year);
}

OUTPUT:

EX 1:

Enter Year : 2000
2000 is a Leap Year

EX 2:

Enter Year : 2004
2004 is a Leap Year

 

WHAT IS A LEAP YEAR ?

 A year is called leap year if it is divisible by 400 (OR) If that year is not divisible by 400 as well as 100 but it is divisible by 4 then that year is also a leap year.

 

Previous article: C Program for Sum of Digits of a Number Prev Next article: C Program to Find Given Number is Perfect or Not Next
  • C Program to Sort List of Strings
  • C Program to Copy Contents From One File to Another
  • C Program to Check Given Number is PRIME or Not
  • Implementation of Stack Using Array in C
  • C Program to Check the Leap Year
  • C Program to Convert Temperature from Degree Centigrade to Fahrenheit
  • C Program for Arithmetic Operations using Switch Statement
  • Find Two's Complement of a Binary Number Using C programming
  • C Program to Find Area and Circumference of a circle.
  • C Program to Print Hello World
  • C Program to Find Sum of All Array Values
  • C Program to Search an Array Element using BINARY SEARCH
  • Fizz Buzz Implementation in C
  • C Program Example to Initialize Structure Variable
  • C Program to find Area of a Circle
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top