Skip to content

Instantly share code, notes, and snippets.

@nalin-adh
Created November 8, 2015 18:15
Show Gist options
  • Save nalin-adh/9721718545afa16cd3ad to your computer and use it in GitHub Desktop.
Save nalin-adh/9721718545afa16cd3ad to your computer and use it in GitHub Desktop.
A C++ program that checks whether a year is leap or not.
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int year;
cout<<"Year = ";
cin>>year;
if(year%4==0)
cout<<year<<" is a leap year.";
else
cout<<year<<" is not a leap year.";
getch();
return(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment