Madaminov jasurbekning
Download 240.08 Kb.
|
8 1 2 12
- Bu sahifa navigatsiya:
- cout > b.pi; cout > b.balandligi; cout
- cout > s.ism; cout > s.fam;
- cout > s.fan; cout cout
- cout main(); }
MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI RADIO VA MOBIL ALOQA FAKULTETI 830-20 GURUH TALABASI MADAMINOV JASURBEKNING 8-LABARATORIYA ISHIDA BAJARGAN LOIHASI 8.1.12 #include using namespace std; class togora{ public: int radiusi, balandligi; float pi; int area (void) {return (radiusi*pi*balandligi);} }; class chelak{ public: int radius, baland; float p; int area (void) {return (radius*p*baland);} }; int main() { chelak a; togora b; cout <<"chelak radiusini kiriting: "; cin >> a.radius; cout <<"pi ni kiriting: "; cin >> a.p; cout <<"chelak balandligini kiriting: "; cin >> a.baland; cout <<"togora radiusini kiriting: "; cin >> b.radiusi; cout <<"pi ni kiriting: "; cin >> b.pi; cout <<"togora balandligini kiriting: "; cin >> b.balandligi; cout << "togora hajmi= " << b.area() << endl; cout << "chelak hajmi= " << a.area() << endl; return 0; } 8.2.12 #include using namespace std; class oqituvchi{ public: char ism[20], fam[20]; int yosh; int malakasi; char fan[30]; }; int main(){ oqituvchi s; cout << "Oqituvchi ismini kiriting: "; cin >> s.ism; cout << "Oqituvchi familiyasini kiriting: "; cin >> s.fam; cout << "Yoshini kiriting: "; cin >> s.yosh; cout << "Necha yillik ish tajribasiga ega: "; cin >> s.malakasi; cout << "Mutaxasisligini kiriting: "; cin >> s.fan; cout << endl << endl; cout << "Oqituvchi ismi: " << s.ism << endl; cout << "Oqituvchi familiyasi: " << s.fam << endl; cout << "Yoshi: " << s.yosh << endl; cout << s.malakasi << " yildan beri ish faoliyatida." << endl; cout << s.fan << " fanidan dars beradi."; main(); } TOSHKENT 2020 Download 240.08 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling