fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4.  
  5.  
  6.  
  7. int main() {
  8. char myNText[20];
  9.  
  10. printf("put your index : ");
  11. scanf("%s",myNText);
  12.  
  13. int numLet = floor(strlen(myNText));
  14. printf("%d\n",numLet);
  15. int result ;
  16. for(int numText =0;numText<numLet;numText++){
  17.  
  18. int compareTextNum = numLet-numText-1;
  19. if(myNText[numText]!=myNText[compareTextNum]){
  20. result = 1;
  21. goto res;
  22. }
  23.  
  24.  
  25. }
  26. res :(result==1)?printf("No,it's not"):printf("Yes,it is");
  27.  
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
put your index : 6
No,it's not