Skip to content

Instantly share code, notes, and snippets.

@diogomonica
Created May 31, 2010 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diogomonica/420262 to your computer and use it in GitHub Desktop.
Save diogomonica/420262 to your computer and use it in GitHub Desktop.
void imprime_linha_eli (eli linha_elim,int num_linha){
int x=0;
if (linha_elim != NULL){
printf("\n\n");
while (linha_elim != NULL){
x=x+1;
if(x == num_linha){
for (x=0; x<COLUNA; x++)
{
if (linha_elim->coluna[x]!=' '){
printf ("%c", linha_elim->coluna[x]);}
}
}
printf("\n");
linha_elim = linha_elim->seguinte;
}
}
}
int mostra_eli (eli linha_elim){
int x;
int y=0;
int res=0;
if (linha_elim != NULL){
while (linha_elim != NULL){
y=y+1;
for (x=0; x<COLUNA; x++)
{
if (linha_elim->coluna[x]!=' '){
printf ("%c", linha_elim->coluna[x]);}
}
printf("\n");
linha_elim = linha_elim->seguinte;
}
return ceil((float) y / 2);
}
else{
printf ("No eliminations");
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment