#include <iostream>
using namespace std;
float read_input()
{
float x[5],a, b ,c, d ,e ;
cout<<"enter 5 numbers:"<<endl;
for (int i=0; i<5; i++)
{
cin>>x[i];
}
a=x[0];
b=x[1];
c=x[2];
d=x[3];
e=x[4];
cout<<"a="<<a<<endl;
cout<<"b="<<b<<endl;
cout<<"c="<<c<<endl;
cout<<"d="<<d<<endl;
cout<<"e="<<e<<endl;
}
float calculate_average()
{
int total=0 ,avg;
{
total += float read_input( a,b , c ,d,e );
avg = total/5 ;
}
cout<<avg<<endl;
return 0;
}
this is my code but i keep getting (error C2062: type 'float' unexpected)
i real dont know what to do :((((