Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- struct element {
- float wzrost;
- struct element *nast;
- };
- typedef struct element ELEMENT;
- typedef ELEMENT *ADRES;
- void stworz_element(ADRES *pocz)
- {
- ADRES nowy;
- nowy=(ADRES)malloc(sizeof(ELEMENT));
- nowy->wzrost=wzrost;
- if (*pocz==NULL)
- nowy->nast=NULL;
- else nowy->nast=(*pocz);
- (*pocz)=nowy;
- }
- void wypisz (ADRES lista){
- while (lista->nast!=NULL)
- {
- printf("%d",lista->wzrost);
- lista=lista->nast;
- }
- printf ("%f",lista->wzrost);
- }
- int main()
- {
- stworz_element(&lista);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement