Курсовая работа: Система обработки научных данных

sum4 =0.0;

sum5 =0.0;

sum6 =0.0;

clrscr();

cleardevice();

for(int i=0;i<n;i++)

{ sum2 = sum2 + f[i];

sum3 = sum3 + g[i];

}

cout<<setw(15)<<" X "<<setw(20)<<" Y "<<endl<<endl;

for(i=0;i<n;i++)

{

cout<<setw(15)<<f[i]<<setw(20)<<g[i]<<endl;

}

cout<<" The sum of X = "<<sum2<<endl;

cout<<"The sum of Y = "<<sum3<<endl;

float mex = sum2/n;

float mey = sum3/n;

cout<<" The mean of X = "<<mex<<endl;

cout<<"The mean of Y = "<<mey<<endl;

for(i=0;i<n;i++)

{

sum4 = sum4 +((f[i] -mex)*(g[i]-mey));

sum5 = sum5 + pow((f[i]-mex),2);

sum6 = sum6+ pow((g[i]-mey),2);

}

cout<<" The sum of products of deviation from mean of X and Y = "<<sum4<<endl;

cout<<"The sum of squares of deviation from mean of X = "<<sum5<<endl;

cout<<" The sum fo squares of deviation from mean of Y = "<<sum6<<endl;

К-во Просмотров: 673
Бесплатно скачать Курсовая работа: Система обработки научных данных