I am supposed to use a void function that reverses two values to rever se the order of an array. I have written the function to reverse the two values which is below, but now I am confused about how to use this to reverse the entire array.
void swap(double &number1, double &number2)
double temp; //Declaring variables
temp=number1; //Here the numbers are being swaped using a temporary variable