Listing 7
long getMax(long array[],int size){
long max = -2147483648;
int count = 0;
while(count < size){
if(array[count] > max){
max = array[count];
}//end if
count = count + 1;
}//end while loop
return max;
}//end getMax
Listing 7
|