fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5.  
  6. {
  7. int i, a, b, c = 0, j;
  8.  
  9. char s[105];
  10. char t[105];
  11.  
  12. gets(s);
  13. a = strlen(s);
  14. j = a - 1;
  15. for(i = 0; i <= a, j >= 0; i++, j--)
  16. {
  17. t[i] = s[j];
  18. }
  19.  
  20. for(i = 0; i < a; i++)
  21. {
  22. if(t[i] == s[i])
  23. {
  24. c++;
  25. }
  26. else
  27. {
  28. break;
  29. }
  30. }
  31.  
  32.  
  33. if(c >= 1)
  34. {
  35. printf("Yes\n");
  36. }
  37. else
  38. {
  39. printf("No\n");
  40. }
  41. return 0;
  42.  
  43.  
  44. }
  45.  
Success #stdin #stdout 0s 4288KB
stdin
abcdefghijklmnopqrstuvwxyzpqzyxwvutsrqponmlkjihgfedcba
stdout
Yes