TOPIC

Presentation error como resolver?

WillianGustavo asked 3 years ago

To com o presentation error no exercicio 2460 só que nao sei onde to imprimindo errado, alguem me ajuda? Segue o código em linguagem C:


#include <stdio.h>
#include <stdlib.h>

int imprimir(fila *f)
{
    no *aux;
    if (vazia(f)){
        return 0;
    } else {
        aux = f->ini;
        while(aux!=NULL){
        printf("%d ", aux->dado);
        aux = aux->prox;
    }
    }
    return 1;
}

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

  • lreis45 replied 3 years ago

    Para a impressão ser considerada válida, ela deve terminar com "\n" e este não deve ser precedido por espaço em branco. Sugire que você preencha uma variável tipo texto e depois que esta estiver ok, imprima ela.

  • WillianGustavo replied 3 years ago

    obrigado amigo, ajudou muito