// printArrayRecBroken.cc  Print an entire array in C++ (broken)
// P. Conrad for CISC106, sect 99, 11/27/07

#include <iostream>
using namespace std;

void printArrayRecBroken(int a[], int size)
{
  // print an array using recursion

  if ( size == 1  )  // base case
    {
      cout << a[0];
    }
  else // recursive case  
    {
      printArrayRecBroken(a,size-1);
      cout << " " << a[size]; // oops, this is wrong!
    }

}
