Advertisement
Raizekas

Untitled

Apr 25th, 2021
803
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. // Programa yra "DarbuotojoIdPrograma.java" faile. Failą derėtų užsivadinti taip pat arba persivadinti klasės pavadinimą atitinkamai į failo pavadinimą
  2. public class DarbuotojoIdPrograma
  3. {
  4.     public String ieskotiDarbuotojo(int id)
  5.     {
  6.         if ((id >= 0) && (id <= 9999))
  7.         {
  8.             return "Ieškoma darbuotojo...";
  9.         }
  10.         else
  11.         {
  12.             if (id < 0)
  13.             {
  14.                 return "Įvestas neigiamas skaičius. Netinkamas ID.";
  15.             }
  16.             else
  17.             {
  18.                 return "Įvestas per didelis skaičius. Netinkamas ID.";
  19.             }
  20.         }
  21.  
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement