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