Advertisement
Guest User

Dell Computer USB

a guest
Mar 29th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. {
  2. public int intMax(int a, int b, int c) {
  3. int max;
  4. if (a > b) {
  5. max = a;
  6. } else {
  7. max = b;
  8. }
  9. if (c > max) {
  10. max = c;
  11. }
  12. return max;
  13. }
  14. public boolean in3050(int a, int b) {
  15. if (a >= 30 && a <= 40 && b >= 30 && b <= 40) {
  16. return true;
  17. }
  18. if (a >= 40 && a <= 50 && b >= 40 && b <= 50) {
  19. return true;
  20. }
  21. return false;
  22. }
  23. public int redTicket(int a, int b, int c) {
  24. if (a == 2 && b == 2 && c == 2)
  25. return 10;
  26. if ( a == b && b == c)
  27. return 5;
  28. if ( a != b && a != c)
  29. return 1;
  30. else
  31. return 0;
  32. }
  33. public int teaParty(int tea, int candy) {
  34. if (tea < 5 || candy < 5)
  35. return 0;
  36. if ((tea >= 2 * candy) || (candy >= 2 * tea))
  37. return 2;
  38. else
  39. return 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement