Created
November 8, 2015 18:15
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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