#4544: 有誰可以幫我看看 謝謝


jite4513 (以結)


#include<iostream>
using namespace std;
int main()
{     int y=0;
      cin>> y;
      if(((y%4==0)&&(y%100!=0))||(y%400==0))
      cout<< "閏年"<< endl;
      else
      cout<< "平年"<< endl;
      system("pause");
      return 0;
}

有什麼地方出問題

幫我看一下

謝謝

#4545: Re:有誰可以幫我看看 謝謝


leopan0922 (zz)


#include
using namespace std;
int main()
{     int y=0;
      cin>> y;
      if(((y%4==0)&&(y%100!=0))||(y%400==0))
      cout<< "閏年"<< endl;
      else
      cout<< "平年"<< endl;
      system("pause");
      return 0;
}

有什麼地方出問題

幫我看一下

謝謝

我猜輸入改成while(cin>>y)

把system("pause");拿掉應該就可以了