Fanalar haqida (nomi, chilar soni, chilar soni va o’zlashtira olmaganlar soni) to’plam berilgan
Download 42.92 Kb.
|
4.lab.sardorbek
11.Fanalar haqida (nomi, 5 chilar soni, 4 chilar soni, 3 chilar soni va o’zlashtira olmaganlar soni) to’plam berilgan. Fanlarni nomi, o’qituvchi_FIO, 5 chilar soni, 4 chilar soni, 3 chilar soni va o’zlashtira olmaganlar soni bo’yicha qidiruvchi hamda topilgan natijani faylga saqlashni taklif qiladigan dastur tuzing. 11.#include #include #include #include using namespace std; int main(){ int n; bool t=false; cout<<"Fanlar sonini kiriting: "; cin>>n; multimap for (int i = 0; i < n; i++){ string FIO; int beshchi; int tortchi; int uchchi; int ikkichi; cout<cout<<" nomi: "; string nomi; cin>>nomi; FIO = nomi; cout<<"Beshchilar: "; cin>>beshchi; cout<<"Tortchilar: "; cin>>tortchi; cout<<"Uchchilar: "; cin>>uchchi; cout<<"Ikkichilar: "; cin>>ikkichi; M.insert(pair } string S, W, R, T; int N; int U; int F; int G; cout<<"Qaysi fandan beshchilar kerak?:"; cin>>N; int k=0; multimap for ( it = M.begin(); it != M.end(); ++it){ S = it->first; if(S.find(" ") M2.insert(pair } cout<<"Qaysi fandan tortchilar kerak?:"; cin>>U; int l=0; multimap for ( ti = M.begin(); ti != M.end(); ++ti){ W = it->first; if(W.find(" ") M2.insert(pair } cout<<"Qaysi fandan uchchilar kerak?:"; cin>>F; int b=0; multimap for ( et = M.begin(); et != M.end(); ++et){ R = it->first; if(R.find(" ") M2.insert(pair } cout<<"Qaysi fandan ikkichilar kerak?:"; cin>>G; int j=0; multimap for ( ut = M.begin(); it != M.end(); ++ut){ T = it->first; if(T.find(" ") M2.insert(pair } if(t){ cout<<"bor"< char t; cin>>t; if(t=='y'){ ofstream fout("natija.txt"); for ( it = M2.begin(); it != M2.end(); ++it){ fout< cout<<"Natijalar namuna.txt fayliga yuborildi!\n"; } else { for ( it = M2.begin(); it != M2.end(); ++it){ cout< } } else cout<<"yo'q";} Download 42.92 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling