-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheighteen.java
More file actions
40 lines (32 loc) · 722 Bytes
/
eighteen.java
File metadata and controls
40 lines (32 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String A=sc.next();
/* Enter your code here. Print output to STDOUT. */
int f=0;
char[] a =A.toCharArray();
int len=a.length;
for(int i=0; i<=len-1; i++)
{
if(a[i]==a[len-i-1])
{
f=1;
}
else
{
f=0;
break;
}
}
if(f==1)
{
System.out.println("Yes");
}
else
{
System.out.println("No");
}
}
}