帮我看一下好吗?
查看原帖
帮我看一下好吗?
340573
QHWLL楼主2020/5/2 15:29
#include <iostream>
using namespace std;
int main()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    if((a%400==0)||((a%4==0)&&(a%100!=0))) 
{
    cout<<"1"<<endl;
}    
else
{
    cout<<"0"<<endl;
}    
    if((b%400==0)||((b%4==0)&&(b%100!=0))) 
{
    cout<<"1"<<endl;
}
else
{
    cout<<"0"<<endl;
}
    if((c%400==0)||((c%4==0)&&(c%100!=0))) 
{
    cout<<"1"<<endl;
} 
   else 
{
    cout<<"0"<<endl;
} 
   if((d%400==0)||((d%4==0)&&(d%100!=0))) 
{
    cout<<"1";
}
else 
{
    cout<<"0";
}
    return 0;
    
}
2020/5/2 15:29
加载中...