Java a function that returns the maximum value in a float a
Java , a function that returns the maximum value in a float array
Write a function getMax(float a[]) that returns the maximum value in a float array a[]. float getMax(float a[]) (We will assume a has at least one element)
Solution
//Function getMax() that returns maximum value in a float array public static float getMax(float a[]) { float maxValue=array[0]; //store 1st value of array in maxValue for(int i=1;i![Java , a function that returns the maximum value in a float array Write a function getMax(float a[]) that returns the maximum value in a float array a[]. float Java , a function that returns the maximum value in a float array Write a function getMax(float a[]) that returns the maximum value in a float array a[]. float](/WebImages/41/java-a-function-that-returns-the-maximum-value-in-a-float-a-1128100-1761602012-0.webp)