Code:
for(i=0;i<500;i++)
{
    x=valuex[i];
    y=valuey[i];

    A[i][0]=x+y;
    A[i][1]=x*x+3*y;
    A[i][2]=x+2*y*x;
    ……
    A[i][99]=x/2+20*y;
}
In the above code,there are 100 terms:A[i][0]~A[i][100], In fact, I want to use the first n terms of A[i][j],and "n" is the input number by user, how can I realize this efficiently,Thank you for your help.
Best wishes.