Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. public class Solution {
  2. public static void main(String[] args) throws Exception {
  3. BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
  4.  
  5. int a = Integer.parseInt(read.readLine());
  6. String result = new String();
  7.  
  8. {
  9. if (a < 999 && a >= 1)
  10.  
  11. {
  12. if (a % 2 == 0) result = "четное";
  13. else result = "нечетное";
  14. if (a >= 0 && a <= 9) result += " однозначное";
  15. if (a >= 10 && a <= 99) result += " двузначное";
  16.  
  17. else if (a >= 100) result += " трехзначное";
  18.  
  19. result += " число";
  20. }
  21.  
  22. }
  23. System.out.println(result);
  24.  
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement