Muhammad al-Xorazmiy nomidagi Toshkent Axborot texnologiyalari universitetining swd 013-2 guruh talabasi Jumaboyeva Irodaning mta fanidan 3-amaliy topshirig’i Bajardi: Jumaboyeva I tekshirdi: Shoraimov X topshiriq: Variant-11
Bajardi: Jumaboyeva I Tekshirdi: Shoraimov X Topshiriq: Variant-11 N ta elementdan tashkil topgan navbat berilgan. Navbatning eng katta elementini toping va ushbu elementdan keyin 3 sonini kiriting. Dastur kodi:
#include #include using namespace std;
int main() {
int n;
cout << "Navbat uzunligini kiriting: ";
cin >> n;
queue q;
for (int i = 0; i < n; i++) {
int x;
cout << "Elementni kiriting: ";
cin >> x;
q.push(x);
}