Advertisement
Raizekas

Untitled

Apr 1st, 2021
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. package uzduotys;
  2.  
  3. public class TreciaUzduotis
  4. {
  5. public String rastiMiegoValandas(int amzius)
  6. {
  7. if (amzius < 0)
  8. {
  9. return "Netinkamas amžius";
  10. }
  11. else
  12. {
  13. if (amzius < 1)
  14. {
  15. return "14";
  16. }
  17. else
  18. {
  19. if (amzius < 2)
  20. {
  21. return "10 + 4";
  22. }
  23. else
  24. {
  25. if (amzius < 3)
  26. {
  27. return "11 + 2";
  28. }
  29. else
  30. {
  31. if (amzius < 6)
  32. {
  33. return "10";
  34. }
  35. else
  36. {
  37. if (amzius < 14)
  38. {
  39. return "9";
  40. }
  41. else
  42. {
  43. if (amzius < 17)
  44. {
  45. return "17";
  46. }
  47. else
  48. {
  49. if (amzius < 120)
  50. {
  51. return "120";
  52. }
  53. else
  54. {
  55. return "Netinkamas amžius";
  56. }
  57. }
  58. }
  59. }
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement