Thursday, July 10, 2008
Teacher's answer...
#include iostream
/* same thing for the <> thingy*/
using namespace std;
void findStatistics ( int num[], double result[] ) {
int i;
result[0] = num[0];
result[1] = num[0];
result[2] = 0;
for ( i = 0; i <> result[1] )
result[1] = num[i];
result[2] += num[i];
}
result[2] /= 3.0;
return;
}
int main()
{
int num[3], i;
double result[3];
for ( i = 0; i <>> num[i];
}
findStatistics ( num, result );
cout << "Smallest number is " << result[0] << endl;
cout << "Largest number is " << result[1] << endl;
cout << "Average is " << result[2] << endl;
return 0;
}
~kf...xD
; tortured on 4:51 PM =/
__________________________________
the1B02
ONE class of FIFTEEN gentlemen and FIVE ladies
average age of SEVENTEEN
first met each other on 8th apr 08 at T1442
we are
environmental friendly
theCREWS
Designer: no idea
Code Edited: abigail/han sheng
Picture: photobucket
Host: blogger::
photobucket
Thanks: blogskins
click THIS: ♥
thecopyCATS
this blog was created by HANSHENG.
the templater was ABIGAIL.
blogskin found by JESSLE.
you are NOT ALLOWED to copy or take anything from HERE. trespassers WILL be prosecuted.