Before the cubing step values[] = original value squared, so saying cubed = values[]*values[] = originalvalue squared * original value squared = original value to the fourth. Also in your parlance, cube_root is the same as cubed which it is not (e.g., cube root of 27 = 3). So, ultimately I think the way you have it laid out is fairly confusing. You could pass in a second result array to each of the functions and leave your original one intact, depending on your specification....
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
const int size = 10;
void square_array (int values [size]);
void read_numbers (int values [size]);
void cube_array (int values [size]);
int main(int argc, char *argv[])
{
const int size = 10;
int values [size];
int i [size];
read_numbers (values);
square_array (values);
cube_array (values);
cout << "\n\n";
system("PAUSE");
return EXIT_SUCCESS;
}
void read_numbers (int values [size])
{
int index;
cout << "Enter 10 numbers:\n";
for (index = 0; index < size; index++)
cin >> values [index];
}
void square_array (int values [size])
{
int index;
cout << "\nThe square of your input numbers are:\n";
for (index = 0; index < size; index++)
{
values [index] = values [index] * values [index];
cout << "\n\n";
cout << "Square is ---> " << values [index];
}
}
void cube_array ( int values [size])
{
int i;
cout << "\n\nThe cube root of the numbers are:\n";
for (i = 0; i < size; i++)
{
values [i] = values [i] * values [i];
cout << "\n\n";
cout << values [i];
}
}