daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Aug 15th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class ArrayTester
  2. {
  3.    private int min(int[]x)
  4.    {
  5.        int minimum = x[0];
  6.        for(int i = 0; i < x.length; i++)
  7.        {
  8.             if(x[i]<minimum)
  9.             {
  10.                 minimum = x[i];
  11.             }
  12.        }
  13.        return minimum;
  14.    }
  15.    
  16.    private int max(int[]x)
  17.    {
  18.        int maximum = x[0];
  19.        for(int i = 0; i < x.length; i++)
  20.        {
  21.            if(x[i]>maximum)
  22.            {
  23.                maximum = x[i];
  24.            }
  25.        }
  26.        return maximum;
  27.    }
  28.    
  29.    private double avg(int[]x)
  30.    {
  31.        int summe = 0;
  32.        int durchschnitt = x[0];
  33.        for(int i = 0; i < x.length; i++)
  34.        {
  35.            summe += x[i];
  36.        }
  37.        durchschnitt = summe/x.length;
  38.        return durchschnitt;
  39.    }
  40.    
  41.    public void loesung(int[]x)
  42.    {
  43.       System.out.printf("Array: %d", x[]);
  44.    }
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top