fork download
  1. # include <stdio.h>
  2.  
  3. int isPalindrome(char s[]){
  4. int i,x=0;
  5. for(x=0;s[x]!='\0';s[x]++)
  6. for(i=0;i<x/2;i++){
  7. if(s[i]!=s[x-1-i])
  8. return 0;
  9. }return 1;
  10.  
  11. }
  12.  
  13. int main(){
  14. char s[100];
  15. scanf("%s",s);
  16. printf("%s -> %d\n",s,isPalindrome(s));
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0.01s 5304KB
stdin
キリンリキ
stdout
 -> 1