#2215: line 1錯誤


s610172005 (s610172005)


#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int a;
     while(cin >> a)
    {
      int b[a][4];
      for(int i=0;i<a;i++)
        {
         cin >> b[i][0]>>b[i][1]>>b[i][2]>>b[i][3];
         if((b[i][1]-b[i][0])==(b[i][3]-b[i][2]))
               b[i][4]=b[i][3]+(b[i][1]-b[i][0]);
         else

               b[i][4]=b[i][3]*(b[i][3]/b[i][2]);
        }
      for(int i=0;i<a;i++)
      cout << b[i][0]<<" "<< b[i][1]<<" "<< b[i][2]<<" "<< b[i][3]<<" "<< b[i][4]<<endl;
    }
    system("PAUSE");
    return EXIT_SUCCESS;
}

 

 與正確輸出不相符(line:1)
您的答案為: 1 2 3 4 1
正確答案為: 1 2 3 4 5

 

我編譯出來答案是12345阿