Advertisement
jwrbg

Boby

Feb 19th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. package com;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Boby
  6. {
  7. public static void main(String[] args)
  8. {
  9. Scanner scanner = new Scanner(System.in);
  10.  
  11. while (true) {
  12. String input = scanner.nextLine();
  13. boolean isUpperCase = input.equals(input.toUpperCase());
  14. if (input.endsWith("?") && isUpperCase) {
  15. System.out.println("Спокоооо, знам к'во правя!");
  16. }
  17. else if (isUpperCase) {
  18. System.out.println("Споко бе, ман!");
  19. }
  20. else if (input.endsWith("?")) {
  21. System.out.println("Добре.");
  22. }
  23. else if (input.isEmpty()) {
  24. System.out.println("Хубаво деее");
  25. }
  26. else {
  27. System.out.println("Ахъ");
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement