Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

eeeee

def minmaxSearch2(A)
{
    max = 0
    min = 0
    
    j = 1
    
    while (j < (A.size()-1))
    {
        if (A[j] > A[max]) max = j 
        if (A[j] < A[min]) min = j 
        j++
    }
    
    return A[min] + " und " + A[max]
}

A = [1, 7, 234, 23, 44, 5, 88, 3]
println "Das Feld " + A + " hat unter und obere Grenze von " + minmaxSearch2(A) + "."

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.