#8830: C++ 請問一下錯在哪


gn28486449 (金城武看到鬼)


#include <iostream>

using namespace std;

int main()
{   int x=0,y=0,f=0;
   int A[x][5];
   cin>>x;
   for(int a=0;a<=x-1;a++)
   {
        for(int j=0;j<=3;j++)
        {cin>>A[a][j];}
}

     for(int z=0;z<=x;z++)
   {   if((A[z][3]/A[z][2])==(A[z][2]/A[z][1])&&(A[z][2]/A[z][1])==(A[z][1]/A[z][0]))
     {A[z][4]=A[z][3]*(A[z][3]/A[z][2]);
     cout<<A[z][4]<<endl;}


    else if(A[z][3]-A[z][2]==A[z][2]-A[z][1])
      {A[z][4]=A[z][3]+(A[z][3]-A[z][2]);
     cout<<A[z][4]<<endl;
     }
     else{};



     }

    return 0;
}
 
 
等比好像會有問題