It is not clear to me what your mean with:
The average is " i/100
That is not an average of anything. Be more specific.
Furthermore, the code below contains a few changes. Also note that I changed floats into doubles. Use doubles as your default precision (in standard c++) unless there is a special reason not to.
Code:
#include <iostream>
#include <cstdlib>
using namespace std;
double squars (int x, double y=0);
int main()
{
int i(1);
squars (i);
cout<< '\n'<< "The average is "<< i/100.0<< '\n';
system("PAUSE");
return 0;
}
double squars (int x, double y)
{
while (x<=10)
{
y = x * x + y;
cout<< x*x<< endl;
x++;
}
return y;
}