#include<iostream>
using namespace std;
template<class atype,class btype>
float mesos_oros(atype* array, btype size)
{
float sum=0.0; //βοηθητική μεταβλητή.
for(int j=0;j<size;j++)
sum=sum+array[j];
return(sum/size); //μέσος όρος.
}
int intArr[]={1,3,5,9,11,13};
double dubArr[]={1.0,3.0,5.0,9.0,11.0,13.0};
int main()
{
std::cout.setf(ios::fixed, ios::floatfield);
std::cout.setf(ios::showpoint);
std::cout.precision(2);
cout<<"\n MO= "<<mesos_oros<int>(intArr,6);
cout<<"\n MO= "<<mesos_oros<double>(dubArr,6);
return 0;
}