Trabalho estd
#include
#define A 49
#define B 50
#define C 51 typedef struct pilha{ int disc; struct pilha *prox; }Pilha; typedef short COLOR; void setcolor(COLOR c) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), c);
}
void gotoxy(int x, int y) { HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); COORD c = {x - 1, y - 1}; SetConsoleCursorPosition(hOut, c);
}
void disco(int x){ int i; for(i=0;idisc!=0) cont++; aux=aux->prox; } return cont; } void mostrar(Pilha *ref,int x){ int cont,i=0,x1,y; Pilha *aux; cont=contar(ref); aux=ref; if(x==1){ coluna(10); x1=12; } if(x==2){ coluna(30); x1=32; } if(x==3){ coluna(50); x1=52; } if(cont!=0){ while(aux!=NULL){ if(aux->disc==1){ gotoxy(x1-1,4); disco(1); } if(aux->disc==2){ gotoxy(x1-3,5); disco(2); }