#10982: __WA


grimmo02064 (bluebbq)


#include <iostream>
using namespace std;

int main()

{
int y;

while( cin >> y )
{

if (y%4==0 && y%100!=0 || y%400==0)
cout <<"閏年"<<endl;


else
cout <<"平年"<<endl;

return 0;

}
}

 

一直出現WA該怎麼辦??

#10984: Re:WA


sabina (流雲)


#include
using namespace std;

int main()

{
int y;

while( cin >> y )
{

if (y%4==0 && y%100!=0 || y%400==0)
cout <<"閏年"<<endl;


else
cout <<"平年"<<endl;

return 0;

}
}

 

一直出現WA該怎麼辦??

 

#include <stdio.h>

int main(void)

{

int a,b;

while(scanf("%d",&a)!=EOF)

{

if (a%400==0 || a%100!=0 && a%4==0)

printf("閏年\n");

else

printf("平年\n");

}

}

試試這種

我只能幫這樣了

XP