Unnamed
public c v1 · immutable#include <stdio.h>#include <string.h>int main(){ int x,i,j,k,tmp; char str[51]; scanf("%d", &x); // x = número de scanf's printf("%i\n", x); for(i=0;i<x;i++) { printf("here!\n"); //o gajo ignora isto tmp = 0; scanf(" %s", str); k = strlen(str); k = (k % 2 == 0 ? k : k+1); for(j = 0; j <= k; j++){ if(str[j] != str[k-j]){ tmp = 1; break; } } printf("%s\n", (tmp == 0 ? "Sim" : "Nao")); // só mostra dps do segundo scanf (?) } return 0;}