TOPIC

5% DE ERRO

Anduin 110 asked 4 months ago

Alguém me ajuda a resolver os 5% de erro no meu codigo pls

include

main () { char a[1001], c; int d, i, j, N, t = 0; scanf ("%d", &N); for (i = 0; i < N; i++, d = 0, t = 0){ scanf("%c", &c); gets(a);

    for ( j = 0 ; j < 1001; j++){
        if (a[j] == '\0') break; 
        else t++; }

    int b[t + 1];

    for (j = 0; j < t; j++){
        d = a[j];
        if ((d >= 65 && d <= 90) || (d >= 97 && d <= 122)) a[j] = d + 3;
    }

    for (j = 0; j < t; j++)
        b[t - j - 1] = a[j];
    for (j = 0; j < t; j++)
        a[j] = b[j];

    for (j = t/2, d = 0; j < t; j++){
        d = a[j];
        a[j] = d - 1;
    }
    puts(a);
}

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.