Answers for "get largest float of array"

0

get largest float of array

int largestFloat(float array[], int length){     // return type is int
    float max = array[0];                        // max is float
    int i;

    for( i=1; i<length; i++){
         if(array[i] > max){
               max = array[i];
         }
    }

    return max;
}
Posted by: Guest on October-17-2021

Code answers related to "get largest float of array"

Browse Popular Code Answers by Language