Código C:
Ver original
#include <stdio.h> #include <stdlib.h> #include <string.h> #define TAM 40 int palindromo(char[],int); void main (void){ int res_palind; char cad[TAM]; res_palind=palindromo(cad,TAM); } int palindromo(char cad[],int TAM){ int i=0,j,k; while (cad[i]){ for(k=TAM;k<TAM/2;k++){ for(j=0,j>TAM/2;j++){ return (cad[j]-cad[k]); } } i++; } }
Un saludo y graciaaaas