Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <locale.h>
  5.  
  6. int main()
  7. {
  8. int tamanho = 0, repeat, inverte = 265; wchar_t word[266], contrario[266];
  9. //printf("%s", setlocale(LC_ALL,"Portuguese"));
  10. wscanf(L"%ls", (word));
  11. //printf("~%d %d ~~ %d\n", (int) palavra[0], (int) palavra[4], (int) strlen(palavra));
  12. for (repeat = 0; repeat < 266 / 2; repeat ++)
  13. {
  14. /*if (word[repeat] == 'é' || word[repeat] == 'É')
  15. {
  16. word[repeat] = 'e';
  17. }
  18. if (word[repeat] ==)*/
  19. if (word[repeat] != word[265 - repeat])
  20. //if (strcmp(contrario, word) != 0)
  21. {
  22. printf("NAO\n");
  23. return(0);
  24. }
  25. else
  26. {
  27. tamanho ++;
  28. }
  29. }
  30. printf("SIM\n%d\n", tamanho);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement