English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

Hi!
Find the folowing program:

#include
#include
using namespace std;
int main()
{
int number;
double* array;
int i;
double SD;
double PreSD = 0;
double total = 0;
double mean;
double SDbm;
int a;
cout<<"***Standard Deviation***";
cout< cout<<"Enter number of values";
cout< cin>>number;
cout< array = new double[number];
cout< cout<<"Enter values to calculate Standard Deviation";
cout< for (int i = 0; i {
cout< cin>>array[i];
}
for (int i = 0; i {
total = array[i]+total;
}
mean = total/number;
for (int i = 0; i {
PreSD = pow ((array[i]-mean) , 2)+PreSD;
}
SDbm = (PreSD/(number-1));
SD = sqrt (SDbm);
cout< cout<<"Standard Deviation = ";
cout< cout< cout<<"Mean = ";
cout< cout< cout< system("PAUSE");
cout< cout< selection:
cout<<"Would you like to find another Standard Deviation?";
cout< cout<<"(1) Yes";
cout< cout<<"(2) No";
cout< cin>>a;
switch(a)
{
case 1:
system("cls");
return main();
break;
case 2:
return 0;
break;
default:
system("cls");
goto selection;
break;
}
}

2006-12-03 19:36:59 · answer #1 · answered by ? 6 · 0 0

#contain #contain utilising namespace std; int n; int temp[20][20]; int i; int j; int transpose[20][20]; int significant () { cout << " Please provide a fee, which must be contained in the variety between a million-20. " << endl; cin >> n; at the same time as (( n < a million) || ( n > 20)){ cout << "Please attempt lower back and decide a volume between a million-20" << endl; cin >> n; } for (int i = 0; i < n; i++){ for (int j = 0; j < n; j++){ cout << "supply me the " << (i+a million) << " " << (j+a million) << " volume." << endl; cin >> temp[i][j]; } } int sum; sum = 0; for (int ok = 0; ok < n; ok++){ sum = sum + temp[ok][ok]; } cout << "The sum of the Diagonals is: " << sum << endl; go back 0; } it truly is what I absolutely have soo a procedures i cant positioned the matrix jointly after the transpose although allow me understand in case you paintings it out!!

2016-11-23 15:43:28 · answer #2 · answered by Anonymous · 0 0

try above program






http://www.jobsgala.com

2006-12-04 20:09:46 · answer #3 · answered by Sant 2 · 0 0

fedest.com, questions and answers