1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
int numS =10;
int x[15] = {3,4,6,7,8,9,7,6,4,3,2,1,1,4,5};
int C[10][15]= {
{10,14,15,11,1,0,89,0,909,0,0,1,1,0,0},
{17,1,17,16,15,31,0,0,42,420,0,142,1,0,0},
{1,0,0,1,15,0,0,53,1,321,1,135,1,0,0},
...
};
void Function(int numS)
{
int i,j;
for(i = 0; i < numS; i++)
{
for(j = 0; j < 15; j++)
{
result[i] += double(C[i][j]*x[j]);
}
for(i = 0; i < numS; i++)
{
cout <<result[i]<<endl;
}
i = numS;
}
}
|