#898: 只緣身在此山中


lp020477995 (我還有好多東西不會...)


請問一下

我這樣寫有沒有錯?

#include <iostream>
using namespace std;
int main()
{
    int a,b,c,d,e,f;
    while (cin>>a>>b>>c>>d)
    {
          e=b-a;
          f=c-b;
          if (e==f)
          cout<<a<<" "<<b<<" " <<c<<" " <<d<<" " <<(2*d)-c<<"\n";
          else
          cout<<a<<" "<<b<<" " <<c<<" " <<d<<" " <<d*d/c<<"\n";
    }
    system("pause");
    return 0;
}
因為在我的電腦上執行並沒有問題

一直得到wa......