Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. final static String[] chance = {"1.9","2.5","5.3","8.4","10.4","12.3"};
  2. public String checkChancetoDie(int sc)
  3. {
  4. if (sc == 0)
  5. {
  6. return chance[0];
  7. }
  8. else if (sc == 1)
  9. {
  10. return chance[1];
  11. }
  12. else if (sc == 2)
  13. {
  14. return chance[2];
  15. }
  16. else if (sc == 3)
  17. {
  18. return chance[3];
  19. }
  20. else if (sc == 4)
  21. {
  22. return chance[4];
  23. }
  24. else if (sc >= 5)
  25. {
  26. return chance[5];
  27. }
  28. else return "Error";
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement