Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package skoczek;
- import java.util.Scanner;
- public class Skoczek
- {
- public static double[][] skoki(double tab[][], int K, int P)
- {
- double styl = 0, dlugosc = 0, max=0, min=0, notaMin = 0, notaMax = 0;
- for(int i=0; i<tab.length; i++)
- {
- for(int q=3; q<7; q++)
- {
- if (tab[i][q]>notaMax)
- notaMax = tab[i][q];
- else if (tab[i][q]<notaMin)
- notaMin = tab[i][q];
- }
- styl = tab[i][3]+tab[i][4]+tab[i][5]+tab[i][6]+tab[i][7]-notaMax-notaMin;
- dlugosc = 60 - tab[i][2];
- tab[i][8]= styl + dlugosc;
- }
- return tab;
- }
- public static void main(String[] args)
- {
- Scanner in = new Scanner (System.in);
- System.out.println("Glupi program ze skokami");
- int w = 0, k = 60, p = 0;
- double[][] tablica = {{11, 2, 15, 13, 20, 25, 37, 0},
- {12, 4, 15, 11, 20, 25, 37, 0},
- {13, -3, 15, 10, 20, 35, 37, 0},
- {14, -3, 45, 13, 20, 25, 37, 0},
- {15, 1, 35, 13, 10, 25, 37, 0}};
- skoki(tablica, k, p);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement