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 Print Elements of Array Using Pointers
  • C Program to Print Addresses of Variables
  • C Program to Find Sum of Individual Digits of a Positive Integer Number
  • C Program to Print ASCII values of Characters
  • C Program to Find Factorial of a Number using Recursion
  • C program to Implement BREAK Statement
  • C Program to Copy Contents From One File to Another
  • C Program to Print a Message using Functions
  • C Program to Search an Array Element using BINARY SEARCH
  • C Program to find Reverse of a Number
  • C Program to convert Celsius to Fahrenheit
  • C Program to Find Radius and Circumference of a Circle
  • C program to find Sum of Digits of a Positive Integer Number
  • C Program to Find Area of a Triangle
  • C Program to find Area of a Circle
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top