Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. int BuscarDescuento (NodoListaOS * lista) //BUG
  2. {
  3. int a;
  4. char os[30];
  5. NodoListaOS * seg=lista;
  6. NodoListaOS * existe;
  7.  
  8. printf("\nIngrese obra social: ");
  9. fflush(stdin);
  10. gets(os);
  11.  
  12. while(seg!=NULL && strcmp(os, seg->obraSocial)!=0)
  13. {
  14. seg=seg->siguiente;
  15. }
  16. if(strcmp(os, existe->obraSocial)==0)
  17. {
  18. printf("\nDescuento: %d\n", seg->descuento);
  19. a=1;
  20. }
  21. else
  22. {
  23. printf("\nLa obra social no se encuentra\n");
  24. a=-1;
  25. }
  26. return a;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement