12.07.2015 Views

C++ - VideoTutorials-bg.com

C++ - VideoTutorials-bg.com

C++ - VideoTutorials-bg.com

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

cout > n;for (i = 0; i < n; i++){cout > s.name;cout > s.age;q1.InsertElem(s);}pqueue q2;cout > n;for (i = 0; i < n; i++){cout > s.name;cout > s.age;q2.InsertElem(s);}pqueue p, q, r;sortqueue(q1, p);sortqueue(q2, q);r = merge(p, q);r.print();}Задача 136. Да се напише програма, която създава опашка от опашки,елементите на които са структури, съдържащи име и възраст на човек.Да се сортират по възраст компонентите на опашката, след което да сеслеят.Програма Zad136.cpp решава задачата. Някои функции в нея сапропуснати, тъй като са същите като в задача 135.// Program Zad136.cpp#include #include "queue-link.cpp"125

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!