Stay Tuned!

Subscribe to our newsletter to get our newest articles instantly!

C++ Programming

C++ Program to Find Leap Year by Using Function

program to find leap year

Write a program to find if the inputted year is a leap year or not by using the concept of function. Make a function that checks if the year is a leap year;

Source Code,

int isLeapYear(int yr){…}
/*program to find the entered number is a leap year or not*/


/*function decleration*/

int leapyear(int yr);
void main()
 int yr;  
cout<<"Enter Year:";  
leapyear(yr);  getch(); } /*function defination*/ int leapyear(int yr) {      if(yr%400==0 || yr%100!=0 && yr%4==0)       {         cout<<"Leap Year";       }       else         {           cout<<"Not Leap Year";         } }



About Author provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

multiplication table using nested loop
C++ Programming

C Program to Print the Multiplication Table using Nested Loop.

  • March 15, 2016
Write a program that prints a multiplication table using any one nested loop. This is a C++ program to print