1 / 18

Excursie in Romania ( The Land of choice)

Excursie in Romania ( The Land of choice). Elev : Baltoi Ion Costel Marius clasa a X-a A Colegiul National “ Ecaterina Teodoroiu ” Targu-Jiu. Dupa o nunta ca in povesti .

adelio
Download Presentation

Excursie in Romania ( The Land of choice)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Excursiein Romania( The Land of choice) Elev: Baltoi Ion Costel Marius clasa a X-a A Colegiul National “EcaterinaTeodoroiu” Targu-Jiu

  2. Dupa o nunta ca in povesti....

  3. cei2 indragostiti...El... Student eminent la Ea... Studenta la Facultatea de Facultateade Informatica.... LimbiStraine...

  4. S-au ganditcesafaca in luna de miere...Si s-au razgandit... Dar nu le veneanici o ideebunapentruambiisoti...

  5. Dupamulteframantari, mireluii-a venit o idee...Cearfisameargaintr-o excursie in jurulRomaniei??? Patria sa, locurisipeisajeminunate, oameniospitalieri...

  6. Si gandindu-se el, i s-a parut ca excursiaseamana cu ceva... Dar nu-siamintea cu ce... “Aaa... Astaseamana cu listele de la informaticaaaaa... Imialegtraseul, vizitezlocurilecelemaiapropiate, poatemaiadaugcevalocuripe care le voivizita... Sauvoisterge... Si in final, plecam in excursie...” s-a ganditmirele.

  7. sotia a fost de acord cu planullui, mai ales ca doreasainvetecateceva din liste... Listelecircularedubluinlantuite nu erautocmaigrelepentru ea...

  8. Nimicmaisimplu... El ii explica, ea invata...Cum arputeasaisialeagatraseul??? ...cu ajutoruloperatiei de creare.... Prima data trebuiaudeclaratebiblioteca undesuntincluseinstructiunilecevorfi folosite... #include <iostream.h> #include <string.h> silista... struct{char s[25]; nod*ant, *urm;} *prim, *urm; void creare() {inti; nod*t; prim=new nod; cin.get>>prim->s; prim->urm=0; prim->ant=0; ultim=prim; for (i=1;i<n;i++) {t=new nod; cin.get>>t->s; t->urm-0; t->ant=ultim; ultim->urm=t; ultim=t;} ultim->urm=prim; prim->ant=ultim; }

  9. “Daca ne hotaramsavizitamsialteorase care nu se aflapetraseu, am puteafolosiiinserarea...” void inserare() {char m[20]; nod*t,*p; t=prim; cin.get>>m; if (strcmp(ultim->s,m)==0) {p=new nod; cin.get>>p->s; ultim->urm=p; p->ant=ultim; p->urm=prim; ultim=p;} else {while(strcmp(t->s,m)!=0 && t!=prim) t=t->urm; if (t==prim)cout<<“nu exista”; else{p=new nod; cin>>p->s; p->ant-t; p->urm=t->urm; t->urm->ant=p; t->urm=p;} }}

  10. “Sauputemelimina din orasele de pelista cu ajutorulfunctiei de stergere...” void stergere() {char m[20]; nod*t; cin.get>>m; t=prim; while(strcmp(t->s,m)!=0 && t->urm!=prim) t=t->urm; if (t->urm==prim) cout<<“nu exista”; else {t->ant->urm=t->urm; t->urm->ant=t->ant; delete t;} }

  11. “Vatrebuiacumsasortamcrescator... “ void sortare() {nod*i,*j; char t[20]; i=prim; while(i->urm!=prim) {j=i->urm; while(j!=prim) {if(strcmp(i->s,j->s)>0) {strcpy(t,i->s); strcpy(i->s,j->s); strcpy(j->s,t);}} j=j->urm;} i=i->urm;} }

  12. “Inainte de a pleca in excursie, vatrebuisaafisamlista...” void listare() {nod*p; p=prim; do{ cout<<p->s<<“ “; p=p->urm; while(p!=prim); }

  13. “Am terminat de realizatsubprogramele... Cemairamane de facut??? Aaa... Programul principal in care vomapelafunctiilerealizate anterior... ” int main() {creare();listare(); inserare(); listare(); stergere(); listare(); sortare(); listare(); }

  14. Dupacatevasotuli-a explicatintregulalgoritmsi cum functioneazaacesta, sotia a inceputsainvete... Prima data a scris din noualgoritmul... #include <iostream.h> #include <string.h> struct{char s[25]; nod*ant, *urm;} *prim, *urm; void creare() {inti; nod*t; prim=new nod; cin.get>>prim->s; prim->urm=0; prim->ant=0; ultim=prim; for (i=1;i<n;i++) {t=new nod; cin.get>>t->s; t->urm-0; t->ant=ultim; ultim->urm=t; ultim=t;} ultim->urm=prim; prim->ant=ultim; } void listare() {nod*p; p=prim; do{ cout<<p->s<<“ “; p=p->urm; while(p!=prim);}

  15. void inserare() {char m[20]; nod*t,*p; t=prim; cin.get>>m; if (strcmp(ultim->s,m)==0) {p=new nod; cin.get>>p->s; ultim->urm=p; p->ant=ultim; p->urm=prim; ultim=p;} else {while(strcmp(t->s,m)!=0 && t!=prim) t=t->urm; if (t==prim)cout<<“nu exista”; else{p=new nod; cin>>p->s; p->ant-t; p->urm=t->urm; t->urm->ant=p; t->urm=p;} }} void stergere() {char m[20]; nod*t; cin.get>>m; t=prim; while(strcmp(t->s,m)!=0 && t->urm!=prim) t=t->urm; if (t->urm==prim) cout<<“nu exista”; else {t->ant->urm=t->urm; t->urm->ant=t->ant; delete t;} } void sortare() {nod*i,*j; char t[20]; i=prim; while(i->urm!=prim) {j=i->urm; while(j!=prim) {if(strcmp(i->s,j->s)>0) {strcpy(t,i->s); strcpy(i->s,j->s); strcpy(j->s,t);}} j=j->urm;} i=i->urm;} } int main() {creare(); listare(); inserare(); listare(); stergere(); listare(); sortare(); listare(); }

  16. Dupacevatimp, sotia a terminat de invatatlistele... Sotul, fericit ca a reusitsa ii aratesotieiceva din viitoarealuimeserie, iarsotia era fericita ca a invatatcevanou...

  17. In timpcesotiapregateanecesarulpentruexcursie, sotulpregateanouamasinape care era nerabdatorsa o incerce...

  18. Vacantaplacutaaaa!!!

More Related