Trabalho estd

312 palavras 2 páginas
#include
#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); }

Relacionados

  • dpp aula 5 6 7
    473 palavras | 2 páginas
  • Vers o com Parecer Disserta o Regina Lucia Moreira 29 de mar o de 2012
    29485 palavras | 118 páginas
  • cem anos
    333 palavras | 2 páginas
  • Comportamento Humano nas organizações
    6640 palavras | 27 páginas
  • mineração impactos
    2354 palavras | 10 páginas
  • psicologia científica
    6295 palavras | 26 páginas
  • Re lendo Identidades de genero entre homossexuais 0033 NEW 1
    7586 palavras | 31 páginas
  • 2 Texto 8 Universidade Ciencia E Formacao Academica 1
    4343 palavras | 18 páginas
  • Percep O E Psican Lise
    8177 palavras | 33 páginas
  • Codificacao/decodificagio
    4435 palavras | 18 páginas