Advertisement
desislava_topuzakova

Еднакви думи

Jan 20th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class EqualWords {
  4.     public static void main(String[] agrs) {
  5.         Scanner scan = new Scanner(System.in);
  6.  
  7.         String word1 = scan.nextLine();
  8.         String word2 = scan.nextLine();
  9.  
  10.         word1 = word1.toLowerCase();
  11.         word2 = word2.toLowerCase();
  12.  
  13.         if (word1.equals(word2)) {
  14.             System.out.println("yes");
  15.         } else {
  16.             System.out.println("no");
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement