fork(1) download
  1. # include <stdio.h>
  2.  
  3. int isPalindrome(char s[]){
  4. int cnt=0;
  5. for(int i=0;s[i]!= '\0';i++){
  6. s[i] = s[i];
  7. cnt = cnt +1;
  8. }
  9. if(cnt == 9){
  10. return 1;
  11. }
  12. //関数の中だけを書き換えてください
  13. //回文になっているとき1を返す
  14. //回文になっていないとき0を返す
  15.  
  16. }
  17.  
  18. //メイン関数は書き換えなくてよいです
  19. int main(){
  20. char s[100];
  21. scanf("%s",s);
  22. printf("%s -> %d\n",s,isPalindrome(s));
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5288KB
stdin
girafarig
stdout
girafarig -> 1