View difference between Paste ID: e6i1SG5t and e1tME8iF
SHOW: | | - or go back to the newest paste.
1
int BuscarDescuento (NodoListaOS * lista) //BUG
2
{
3
    int a;
4
    char os[30];
5
    NodoListaOS * seg=lista;
6-
    NodoListaOS * existe;
6+
7
        printf("\nIngrese obra social: ");
8
        fflush(stdin);
9
        gets(os);
10
11
        while(seg!=NULL && strcmp(os, seg->obraSocial)!=0)
12
        {
13
            seg=seg->siguiente;
14
        }
15
        if(strcmp(os, seg->obraSocial)==0)
16-
        if(strcmp(os, existe->obraSocial)==0)
16+
17
            printf("\nDescuento: %d\n", seg->descuento);
18
            a=1;
19
        }
20
        else
21
        {
22
            printf("\nLa obra social no se encuentra\n");
23
            a=-1;
24
        }
25
    return a;
26
}