Sim0o0na

Untitled

Jan 18th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. /**
  4. * Created by todor on 18.01.2017 г..
  5. *
  6. * Да се напише програма, която въвежда две думи и проверява дали са еднакви.
  7. * Да не се прави разлика между главни и малки думи. Да се изведе “yes” или “no”.
  8. *
  9. */
  10. public class u11_EqualWords {
  11. public static void main(String[] args) {
  12.  
  13. Scanner scan = new Scanner(System.in);
  14.  
  15. String word1 = scan.nextLine().toLowerCase();
  16. String word2 = scan.nextLine().toLowerCase();
  17.  
  18. if (word1.equals(word2)){
  19. System.out.println("yes");
  20. }
  21. else {
  22. System.out.println("no");
  23. }
  24. }
  25. }
Add Comment
Please, Sign In to add comment