//@Author Damien Bell
#include <iostream>
#include <algorithm>

using namespace std;
//Simple function prototype
//int doMath(int, int);  //Returns something (int in this case) or nothing (a void)


//Fill array function to show how to pass an array to  -- Prototype
void fillArray(int arrayXYZ[]);

int main(){
        
    //Case -- switch
    //functions
    //arrays
    
    //int x, y; 
    
    
//Simple function
//    cout <<" Enter first number ";
//    cin >> x;

//    cout <<" Enter second number ";
//    cin >> y;
    
//    int sum = (doMath(x,y));
    
    
//    cout << "\n" << sum;
    
    
    
    
    //Array fill using a function to show pass by reference on arrays
    
     int arrayOfInts[5]={0};// 0,1,2,3,4   subscript [5]  -- Out of bounds error --returns junk values in c++
    
     fillArray(arrayOfInts);//Pass arrayOfInts array into fillArray function.
     
     for (int i=0; i<5; i++){//output array loop.
         cout << arrayOfInts[i]<<endl;
     }
     
     
 return 0;
}


//Simple sum function
//int doMath(int firstNumber, int secondNumber){
//    return firstNumber+secondNumber;
//}



//Fill Array function
void fillArray(int arrayXYZ[]){
        for (int i=0; i<5; i++){//Propagate array loop
        arrayXYZ[i] = i;
        }
}