Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Bobby
  4. {
  5. public static void main(String[] args)
  6. {
  7. Scanner in = new Scanner(System.in);
  8. String sentence = in.nextLine();
  9.  
  10. while (!sentence.equals("END")) {
  11. if (sentence.equals("")) {
  12. System.out.println("Good then");
  13. }
  14. else if (sentence.charAt(sentence.length()-1) == '?') {
  15. if (sentence.equals(sentence.toUpperCase())) {
  16. System.out.println("I know what I am doing!");
  17. }
  18. else {
  19. System.out.println("Good");
  20. }
  21. }
  22. else if (sentence.equals(sentence.toUpperCase())) {
  23. System.out.println("Cool man");
  24. }
  25. else {
  26. System.out.println("Uum");
  27. }
  28. sentence = in.nextLine();
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement