I have tried a program for the first n*p perfect squares and there are some problems like :
error C2668: 'sqrt' : ambiguous call to overloaded function
;could be 'long double sqrt(long double)';
'float sqrt(float)';double sqrt(double)' etc ;
then I changed i from int to float/double and that did not help me at all. Also I have seen on this forum this function : static_cast<double> and this did not work either .
If you can help me with this I will really apreciate . Thanks
Initializing n with 10 is really unnecessary; it doesn't achieve anything.
I did it because in old compilers, if std::cin >> n fails, the value of n would remain unchanged; and 10 becomes a default value to be used in case of input failure.