Explore
ProGrad Programs
About Us

Edit
Reply




Edit

Leap year program in C, C++ and Java | Program to check if a given year is a leap year or not

Published on 08 Mar 2020

In this article, we will discuss the leap year program in C with and without using command line arguments.


Problem:


Write a c program, to check whether the given year is a leap year or not. A leap year is a calendar year containing one additional day (Feb 29th) added to keep the calendar year synchronized with the astronomical year.


Flowchart for leap year program


flowchart of leap year program in c


Leap year program


C
C++
Java
Python 3

Output
Input- Enter a year:2004 Output- 2004 is a leap year


Leap year program using functions


C
C++
Java
Python 3

Output
Input- Enter a year:1998 Output- 1998 is not a leap year


Recommended Programs










If you have any feedback about this article and want to improve this, please write to enquiry@faceprep.in