1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#include <iostream>
using namespace std;
//write your functions here
int main ()
{
//biggestEntry:
cout << "Testing biggestEntry: ";
int arr1 [2][3] = {{1, 8, 3}, {4, 7, 3}};
cout << biggestEntry (arr1, 2, 3) << endl; //prints: 8
//toTen:
cout << "Testing toTen: ";
int arr2 [8] = {5, 3, 1, 6, 10, 1, 30, 100};
cout << toTen (arr2, 8) << endl; //prints: 4,
cout << "Testing toTen: ";
int arr3 [8] = {1, 1, 1, 1, 1, 1, 1, 1};
cout << toTen (arr3, 8) << endl; //prints: -1
//sixCount:
cout << "Testing sixCount: ";
int arr4 [2][6] = {{6, 4, 3, 1, 2, 2666}, {6, 6, 5, 2, 3, 66}};
cout << sixCount (arr4, 2, 6) << endl; //prints: 8,
cout << endl;
return 0;
} //main
|