Guest User

Untitled

a guest
Jun 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. CoD aux = (CoD)malloc(sizeof(Cod));
  2. if(lista==NULL)
  3. {
  4. lista = (CoD)malloc(sizeof(Cod));
  5. lista->cond=p;
  6. for(i=0;i<10;i++)
  7. {
  8. if(i<2){lista->condicao[i]=c[i];}
  9. lista->hipo[i]=h[i];
  10. }
  11. lista->prox=NULL;
  12. free(aux);
  13. }
  14. else
  15. {
  16. aux->cond=p;
  17. for(i=0;i<7;i++)
  18. {
  19. if(i<3){aux->condicao[i]=c[i];}
  20. aux->hipo[i]=h[i];
  21. }
  22. aux->prox=lista;
  23. lista=aux;
  24. }
  25.  
  26. return lista;
  27. }
Add Comment
Please, Sign In to add comment