I need a little assistance with finding the square roots of each number entered by the user in a array. I'll copy and paste what i have so far in my function, but i get an error when i try to run the program and it would say:
sqrt was not declared in the function
Code:
void print_square_root (double values [size])
{
int index;
cout << "The square root of the numbers are:\n";
for (index = 0; index < size; index++)
{
values [index] = sqrt (values [index]);
cout << "\n\n";
cout << showpoint << fixed << setprecision (2);
cout << setw (9) << values [index];
}
Anyone with any suggestions on how i would get the square roots to work for each number in the array I would greatly appreciate it...Thank You