This should work now. You gotta learn arrays, passing arrays to functions, returning arrays, etc. profoundly in order to master arrays.
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
const int size = 10;
void square_store (int [], int []);
void read_numbers (int []);
void cube_store (int [], int []);
int main(int argc, char *argv[]){
const int size = 10;
static int values[size], square_array [size], cube_array[size];
int i [size];
read_numbers (values);
square_store (square_array, values);
cube_store (cube_array, values);
cout << "\n\n";
system("PAUSE");
return EXIT_SUCCESS;
}//main() ends
void read_numbers (int values[]){
int index;
cout << "Enter 10 numbers:\n";
for (index = 0; index < size; index++)
cin >> values [index];
}//read_numbers() ends
void square_store (int square_array[], int values[]){
int index;
cout << "\nThe square of your input numbers are:\n";
for (index = 0; index < size; index++){
square_array [index] = values [index] * values [index];
cout << "\n\n";
cout << "Square is ---> " << square_array [index];
}
}//square_store() ends
void cube_store ( int cube_array[], int values[]){
int i;
cout << "\n\nThe cubes of the numbers are:\n";
for (i = 0; i < size; i++){
cube_array [i] = values [i] * values [i] * values [i];
cout << "\n\n";
cout << "Cube is ---> " << cube_array[i];
}
}//cube_store() ends
As pointed by jonsca, there are many tuts/ebboks on the 'firehose of information'(the Internet).
Cheers