Advertisement
Raizekas

Untitled

Mar 31st, 2021
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. package uzduotys;
  2.  
  3. public class AntraUzduotis
  4. {
  5. public String patikrintiAmziu(int amzius)
  6. {
  7. if (amzius < 0)
  8. {
  9. return "Netinkamas amžius";
  10. }
  11. else
  12. {
  13. if (amzius <= 18)
  14. {
  15. return "Per mažas amžius";
  16. }
  17. else
  18. {
  19. if (amzius <= 120)
  20. {
  21. return "Galite registruotis";
  22. }
  23. else
  24. {
  25. return "Netinkamas amžius";
  26. }
  27. }
  28. }
  29. }
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement