我看不太懂這題目
如果可以
幫忙教一下
# include <cstdlib>
# include <iostream>
# include <math.h>
using namespace std;
int main (int, char**)
{
int a;
while(cin >> a)
{
//
if(a%4==0||a%400==0||a%100==0)
{
cout <<"閏年";
}
else
{
cout <<"平年";
}
cout <<endl;
}
system("pause");
return 0;
}
我看不太懂這題目
如果可以
幫忙教一下
# include
# include
# include
using namespace std;
int main (int, char**)
{
int a;
while(cin >> a)
{
//
if((a%4==0&&a%100!=0)||a%400==0)你閏年的定義沒看清楚
{
cout <<"閏年";
}
else
{
cout <<"平年";
}
cout < }
system("pause");
return 0;
}