Advertisement
IvanChacos

Untitled

Jan 18th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include "Header.h"
  5.  
  6. void Palindromo(char palindromo[100])
  7. {
  8. int i = 0;
  9. int letras = 0;
  10.  
  11. letras = strlen(palindromo);
  12.  
  13. for(i = 0; i < letras; i++)
  14. {
  15. if(palindromo[i] != palindromo[letras-1])
  16. {
  17. printf("No es un palindromo.");
  18. return 0;
  19. }
  20. letras--;
  21. }
  22.  
  23. printf("Es un palindromo.");
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement