All pastes #36855 Raw Edit

Something

public text v1 · immutable
#36855 ·published 2006-01-15 13:15 UTC
rendered paste body
void usun_el(struct Tlista_jedn *head){
struct Tlista_jedn *pom=head,*pom1=NULL;
char el_do_us[20];

printf("Oto lista:\n");
wyswietl_liste(head);

if(head!=NULL){
	printf("Podaj element do usuniecia:");
	fgets(el_do_us,20,stdin);
	while(strcmp(pom->dane,el_do_us)!=0) {
          pom1=pom;
	  pom=pom->nast;
        }
	if(pom1==NULL)
          head=pom->nast;
        else
          pom1->nast=pom->nast;
	free(pom);
}
}