borkins

11a. Equal Words

Mar 23rd, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. /*
  2.  * Simple Conditions
  3.  */
  4. import java.util.Scanner;
  5.  
  6. public class _11a_EqualWords
  7. {
  8.     public static void main(String[] args)
  9.     {
  10.         Scanner scan = new Scanner(System.in);
  11.        
  12.         // Input two strings and set them lower case
  13.         String word1 = scan.nextLine().toLowerCase();
  14.         String word2 = scan.nextLine().toLowerCase();
  15.  
  16.         if (word1.equals(word2)) {
  17.             System.out.println("yes");
  18.         } else {
  19.             System.out.println("no");
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment