Facebook
From Tiny Anoa, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 258
  1. public static void main(String[] args) {
  2.        
  3.         Scanner sc=new Scanner(System.in);
  4.         String A=sc.next();
  5.         /* Enter your code here. Print output to STDOUT. */
  6.         boolean found = true;
  7.                 for (int i = 0; i < A.length() / 2; i++) {
  8.                         if (A.charAt(i) != A.charAt(A.length() - 1 - i)) {
  9.                                 found = false;
  10.                                 break;
  11.                         }
  12.                 }
  13.                 System.out.println(found ? "Yes" : "No");
  14.         }
  15. }
  16.        
  17.  
  18.  
  19.  
  20.