Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "headers3.h"
- void palindromo()
- {
- int letras = 0;
- int i = 0;
- char str[99];
- printf("Ingresa una palabra: ");
- scanf("%s", str);
- letras = strlen(str);
- for(i = 0; i < letras; i++ )
- {
- if(str[i] != str[letras-1])
- {
- printf("No es un palindromo ");
- return 0;
- }
- letras--;
- }
- printf("Si es un palindromo ");
- return 0;
- }
Add Comment
Please, Sign In to add comment