Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static int selekcja(int [] oceny){
- int index=random.nextInt(oceny.length);
- int wybor=oceny[index];
- int wynik=index;
- for(int i=0;i<1;i++){
- index=random.nextInt(oceny.length);
- if(oceny[index]<wybor){
- wybor=oceny[index];
- wynik=index;//jeżeli losowane rozwiązanie jest krótsze to podstawiamy jako nasz wybór
- }
- }
- return wynik;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement