#include<iostream>
using namespace std;
int main()
{
int n=0,a,b,c;
cin>>n;
a=n%4;
b=n%100;
c=n%400;
if(a==0,b!=0)
cout<<"閏年";
else if(c==0)
cout<<"閏年";
else
cout<<"平年";
return 0;
}
#include
using namespace std;
int main()
{
int n=0,a,b,c;
cin>>n;
a=n%4;
b=n%100;
c=n%400;
if(a==0,b!=0)
cout<<"閏年";
else if(c==0)
cout<<"閏年";
else
cout<<"平年";
return 0;
}
Input 不只一個, 要LOOP
#include
using namespace std;
int main()
{
int n=0,a,b,c;
cin>>n;
a=n%4;
b=n%100;
c=n%400;
if(a==0,b!=0)
cout<<"閏年";
else if(c==0)
cout<<"閏年";
else
cout<<"平年";
return 0;
}