#13827: 為甚麼這樣寫會是WA?


eric.wu090901@gmail.com (柚柚 eric)


#include <stdio.h>
#include <stdlib.h>
int main()
{
    int year;
    scanf("please input the year: %d",&year);
    if(year/4==0&&year/100!=0||year/400==0)
    {
      printf("閏年");
    }
   else
  {
     printf("平年");
  }
return 0;
}
#13828: Re:為甚麼這樣寫會是WA?


anandrewboy70900 (ShowTsai)


#include
#include
int main()
{
    int year;
    scanf("please input the year: %d",&year);
    if(year/4==0&&year/100!=0||year/400==0)
    {
      printf("閏年");
    }
   else
  {
     printf("平年");
  }
return 0;
}



取餘數是%