code.cpp 167 B

123456
  1. // Create a function that accepts an array of numbers
  2. // and returns the last number in the array.
  3. int getLastItem(int arr[], int length) {
  4. return arr [length-1];
  5. }