Pilha

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> #define MAX 10 int main(void) { int i, pilha[10]; for(i=0; i<MAX; i++ { scanf("%d", &pilha[i]); printf("Adicionado a pilha: %d\n", pilha[i]); } printf("\n\n"); for(i=MAX-1; i>=0; i--) { printf("%d - Retirado da pilha: %d\n", i+1, pilha[i]); } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines