Advertisement
Guest User

tablice decyzyjne

a guest
Nov 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. package com.company;
  2.  
  3. import com.sun.codemodel.internal.JForEach;
  4. import com.sun.deploy.util.BlackList;
  5. import com.sun.media.sound.SF2InstrumentRegion;
  6. import javafx.util.Pair;
  7.  
  8. import java.util.ArrayList;
  9. import java.util.HashMap;
  10. import java.util.HashSet;
  11.  
  12. public class Main {
  13. { coding();
  14. }
  15.  
  16. public int coding()
  17. {
  18. int ilosc_trafionych=2;
  19. int ilosc_wyszukiwanych=4;
  20. float procent;
  21. int waga;
  22. procent= ilosc_trafionych/ilosc_wyszukiwanych;
  23. if(procent<0.25)
  24. {
  25. waga= 1;
  26. }
  27. if (procent<0.5)
  28. {
  29. waga =3;
  30. }
  31. if(procent<0.75)
  32. {
  33. waga = 5 ;
  34. }
  35. else
  36. {waga = 7;
  37. }
  38.  
  39. return waga;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement