Excellent Code
simply excellent ...
Pages
Home
Request for more
C++ : check 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);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment