What is the problem with my code?Please tell me

#include

using namespace std;

int main()
{
int T,A,B,N,C,D;
cin>>T;
int arra[T];
int arrb[T];
int arrn[T];
int arrc[T];
int arrd[T];

for (int i = 0; i < T; i++) 
{
    cin>>arra[i]>>arrb[i]>>arrn[i];
}

for (int i = 0; i < T; i++)
{
while(arrn[i]>0)
{
arrc[i] = arra[i]*2;
arrn[i]–;
if(arrn[i]>0)
{
arrd[i] = arrb[i]*2;
arrn[i]–;
}
}
}

for (int i = 0; i < T; i++) 
{
    if(arrc[i]>arrd[i])
    {
        cout<<arrc[i]/arrd[i]<<endl;
    }
    else
    {
        cout<<arrd[i]/arrc[i]<<endl;
    }
}

return 0;

}

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

1 Like