Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C_141203_PALINDROMO
//Title of this code #include <stdio.h> #include <ctype.h> #include <string.h> int main(void) { char c1[100]; char c2[100]; char c3[100]; short i, j; printf("c1: "); gets(c1); for(i = j = 0 ; c1[i] ; i++) { if(isalnum(c1[i])) { c2[j++] = toupper(c1[i]); } } c2[j] = 0; for(i = 0 ; c2[i] ; i++) { c3[strlen(c2) - 1 - i] = c2[i]; } c3[i] = 0; printf("\n\n"); printf("Cadena1: %s\n", c1); printf("Cadena2: %s\n", c2); printf("Cadena3: %s\n", c3); if(strcmp(c2, c3) == 0) { printf("%s SÍ ES PALÍNDROMO...\n", c1); } else { printf("%s NO ES PALÍNDROMO...\n", c1); } return 0; }
run
|
edit
|
history
|
help
0
NETFLIX TERMINADO
PREGUNTA 2, GUÍA 4, MÓDULO 3 FINALIZADA
C dynamic string implementation using preprocessor
Ordered Openmp
recursive fundamentos
REGISTRO EN C
String copy
B_141107_TablaMultiplicar
finalpyramid
HW2A