Check leap year and print nearest leap year.
2018-01-21
0 0 0
no vote
Other
Earn points
#include
using namespace std;
int lyear(int a);
int main(void)
{
int i,n,j,k,l,m;
cin>>n;
if(lyear(n)==1)
{
cout<<"Leap year";
}
else
{
cout<<"Not leap year\nNearest is ";
j=n+1;
k=n-1;
while(1)
{
j++;
k--;
l=lyear(j);
m=lyear(k);
if(l==1)
{
cout<<j;
using namespace std;
int lyear(int a);
int main(void)
{
int i,n,j,k,l,m;
cin>>n;
if(lyear(n)==1)
{
cout<<"Leap year";
}
else
{
cout<<"Not leap year\nNearest is ";
j=n+1;
k=n-1;
while(1)
{
j++;
k--;
l=lyear(j);
m=lyear(k);
if(l==1)
{
cout<<j;
Related Source Codes
Android AOA Android Open Accessory Development Usi
0
0
no vote
Golang AOA Android Open Accessory HID Control
0
0
no vote
PClite
0
0
no vote
GMSK Linear Receiver
0
0
no vote
The golden version of AFT that has been passed dow
0
0
no vote
No comment