Jak doładować swój telefon za darmo? Z darmowe-doladowania.com to proste! Nie musisz sie rejestrować, wystarczy, że wyślesz Twój link do 25 znajomych a darmowe doładowanie może być Twoje!
WYSTARCZY SIĘ ZAREJESTROWAĆ PONIŻEJ : DZIAŁA
http://darmowe-doladowania.com/
Implementacje algorytmów, struktur danych w języku C/C++. Drzewa binarne,listy jednokierunkowe,dwukierunkowe,tablice dynamiczne, wskaźniki.
niedziela, 1 listopada 2009
wtorek, 29 września 2009
Implementacja listy jednokierunkowej bez "->"
#include#include #include struct lista{ int key; struct lista *next; }; struct lista *head=NULL; struct lista *tmp=NULL; struct lista *element=NULL; struct lista *push(struct lista *head,int x){ if(head==NULL){ head=(struct lista*)malloc(sizeof(struct lista)); tmp=(struct lista*)malloc(sizeof(struct lista)); (*head).key=x; (*head).next=NULL; //head->key=x; //head->next=NULL; tmp=head; }else{ element=(struct lista*)malloc(sizeof(struct lista)); (*element).key=x; //element->key=x; (*element).next=NULL; //element->next=NULL; //tmp->next=element; (*tmp).next=element; tmp=element; } return head; } void wyswietl(struct lista *head){ while(head){ //printf("%d",(*head).key); printf("%d", (*head).key); (head)=(*head).next; } } int main(){ system("cls"); int x; int n; printf("Ile elementow dodac \n"); scanf("%d",&n); for(int i=0;i<(n);i++){ scanf("%d",&x); head=push(head,x); } wyswietl(head); }
O co mi chodzi,,
Chodzi mi o to, aby język giętkiPowiedział wszystko, co pomyśli głowa:A czasem był jak piorun jasny, prędki,A czasem smutny jako pieśń stepowa,A czasem jako skarga nimfy miętki,A czasem piękny jak aniołów mowa...Aby przeleciał wszystka ducha skrzydłem.Strofa być winna taktem, nie wędzidłem.
Subskrybuj:
Posty (Atom)