iamakulov icon

Untitled

iamakulov | PRO | 03/23/14 12:36:52 PM UTC | 0 ⭐ | 484 👁️ | Never ⏰ | []
C |

460 B

|

None

|

0 👍

/

0 👎

void task10()
{
    struct Stack *beforeFirstPositive = NULL;
 
    if (L == NULL)
        return;
 
    run = L;
    while (run->next != NULL) {
        if (run->next->inf > 0) {
            beforeFirstPositive = run;
            break;
        }
 
        run = run->next;
    }
 
    if (!beforeFirstPositive)
        return;
 
    run = beforeFirstPositive->next;
    beforeFirstPositive->next = beforeFirstPositive->next->next;
    free(run);
}

Comments