0
I’m solving a list of exercises on stacks and queues and stuck on a question where ask to write the program according to pseudo code of the question.
I have very little experience with C, so I’m not getting around to it. I wanted your help from the O.R..
Program:
Programa inverte var P : Pilha;
n : inteiro;
s : literal;
Início
Imprima('Entre com uma frase: ');
Leia(s)
Inicia(P); //{Torna a pilha vazia}
Para n de 1 até COMP(s) faça
PUSH(P, s[n]);
Enquanto não Vazia(P) faça //{pilha vazia, para}
Imprima (POP(P));
Fim-enquanto;
Fim
And what is your question? How far have you come? Give us your current code so we can help you solve your problem, and not do your exercise.
– Kevin Kouketsu