STL de queue operatsiyaların súwretlew ushın CPP kodı




Download 112.39 Kb.
bet3/3
Sana26.10.2022
Hajmi112.39 Kb.
#28216
1   2   3
Bog'liq
hsdhfsdhasd, 6 - A JAVOBLARI, 4 varianttttt, 1 (2), 3 amaliy toshiriq, 1 amaliy topshiriq, 2 amaliy toshiriq, Asqarova Nazokat 333 (2), IWr63ZFf4hKyx2keMksxu5pETrINmP7GjvnFKMGN, sport-i-fizkultura-kak-neotemlemaya-chast-zhizni
STL de queue operatsiyaların súwretlew ushın CPP kodı
// Divyansh Mishra --> divyanshmishra101010
#include
#include
std at maydanından paydalanıw ;
// Queueti baspadan shıǵarıw
void print_queue (queue q)
{
queue temp = q;
while (! temp. empty ()) {
cout << temp. front () <<" ";
temp.pop ();
}cout << '\n';}

// Aydawshı kodı


int main ()
{
queue q1;
q1.push (1);
q1.push (2);
q1.push (3);
cout << " Birinshi queue: ";
print_queue (q1);
queue q2;
q2.push (4);
q2.push (5);
q2.push (6 );
cout << " Ekinshi queue: ";
print_queue (q2);
q1. swap (q2);
cout << " Almastırilgandan keyin birinshi náwbette: ";
print_queue (q1);
cout << " Ekinshi queue almastırilgandan keyin: ";
print_queue (q2);
cout<qaytıw 0;
}



Paydalanılǵan ádebiyatlar :
1. http//:wikipedia
2. MA'LUMOTLAR TUZILMASI vA ALGORITMLAR Ullıaliyev B. B. Yusupova Z. Dj.
3.Alfred V. Axo., Djon E. Xopkroft, Djefri D. Ul'man. Struktura dannix i algoritmi//Ucheb.pos., M.: Izd. dom: " Vil'yams", 2000,- 384 s
http://fayllar. org
4. C++ STL Container Fundamentals: Queue | Interview Kickstart
5. Konteyner QUEUE c++ - Search (bing.com)

Download 112.39 Kb.
1   2   3




Download 112.39 Kb.

Bosh sahifa
Aloqalar

    Bosh sahifa



STL de queue operatsiyaların súwretlew ushın CPP kodı

Download 112.39 Kb.