#include
float Total(float a[],int num);
const int SIZE = 10;
main()
{
float * f = new float [SIZE];
for (int i=0;i f[i]=i+i; //*(f+i)
cout <<"Sum = " << Total( f ,SIZE) < cout << "Average = " << Total(f,SIZE)/SIZE;
delete []f;
return 0 ;
}
float Total(float a[],int num)
{
int i;
float sum = 0;
for (i=0; i sum += a[i];
return sum;
}
Sum = 90
Average = 9"