Demo entry 6635767

WTF

   

Submitted by anonymous on Aug 19, 2017 at 16:28
Language: Java. Code size: 389 Bytes.

public class Auf_oder_absteigend
{
    
    public static int WTF (double a[])
    {
        int i;
        
        for(i = 1; i < a.length && a[i-1]<= a[i] ; i++);
        if(i == a.length)
        return 1;
        
        for(i = 1; i < a.length && a[i-1] >= a[i] ; i++);
        if(i == a.length)
        return -1;
        else
        return 0;
        
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).