uchbur3.turi="otkir burchakli ";
uchbur3.tomoni=20;
uchbur3.burchagi=35;
uchbur3.balandligi=23;
cout<<"uchburchakni turi "< cout<<"uchburchakni tomoni "< cout<<"uchburchakni burchagi "< cout<<"uchburchakni balandligi "<}
.Firmaning xodimlari to’g’risida quyidagi ma’lumotlar ma’lum: Familiyasi, ismi, jinsi, farzandi (bor yoki yo’q) haqida ma’lumot berilgan. Farzandi bo’lgan ayol xodimlar ro’yxatini chop etuvchi dastur tuzing.
class ishchilar
{
public:
string familyasi;
string ismi;
string jinsi;
string farzand;
int yoshi;
int ish_haqqi;
};
int main() {
ishchilar ob1, ob2, ob3, ob4, ob5;
ob1.familyasi = "xojimurodova";
ob1.ismi = "Dilfuza";
ob1.jinsi = "Ayol";
ob1.yoshi = 17;
ob1.farzand = "yoq";
ob1.ish_haqqi = 500;
ob2.familyasi = "Mirzayev";
ob2.ismi = "Donyor";
ob2.jinsi = "Erkak";
ob2.yoshi = 18;
ob2.farzand = "yoq";
ob2.ish_haqqi = 100;
ob3.familyasi = "Juraboyeva";
ob3.ismi = "Mushtari";
ob3.jinsi = "Ayol";
ob3.yoshi = 18;
ob3.farzand = "yoq";
ob3.ish_haqqi = 50;
ob4.familyasi = " Yusupova";
ob4.ismi = " Muxlisa";
ob4.jinsi = "Ayol";
ob4.yoshi = 25;
ob4.farzand = "Bor";
ob4.ish_haqqi = 400;
ob5.familyasi = "Abdusalomova";
ob5.ismi = "Maftuna";
ob5.jinsi = "Ayol";
ob5.yoshi = 18;
ob5.farzand = "yoq";
ob5.ish_haqqi = 300;
cout << "ishchinig familyasi " << ob1.familyasi << endl;
cout << "ismi " << ob1.ismi << endl;
cout << "jinsi " << ob1.jinsi << endl;
cout << "ish haqqi " << ob1.ish_haqqi << "$" << endl;
cout << "ishchinig yoshi " << ob1.yoshi << endl;
cout << "ishchining farzandi " << ob1.farzand << endl;
cout << endl;
cout << "ishchinig familyasi " << ob2.familyasi << endl;
cout << "ismi " << ob2.ismi << endl;
cout << "jinsi " << ob2.jinsi << endl;
cout << "ish haqqi " << ob2.ish_haqqi << "$" << endl;
cout << "ishchinig yoshi " << ob2.yoshi << endl;
cout << "ishchining farzandi " << ob2.farzand << endl;
cout << endl;
cout << "ishchinig familyasi " << ob3.familyasi << endl;
cout << "ismi " << ob3.ismi << endl;
cout << "jinsi " << ob3.jinsi << endl;
cout << "ish haqqi " << ob3.ish_haqqi << "$" << endl;
cout << "ishchinig yoshi " << ob3.yoshi << endl;
cout << "ishchining farzandi " << ob3.farzand << endl;
cout << endl;
cout << "ishchining familyasi " << ob4.familyasi << endl;
cout << "ismi " << ob4.ismi << endl << endl;
cout << "jinsi " << ob4.jinsi << endl;
cout << "ish haqqi " << ob4.ish_haqqi << "$" << endl;
cout << "ishchinig yoshi " << ob4.yoshi << endl;
cout << "ishchining farzandi " << ob4.farzand << endl;
cout << endl;
cout << "ishchinig familyasi " << ob5.familyasi << endl;
cout << "ismi " << ob5.ismi << endl;
cout << "jinsi " << ob5.jinsi << endl;
cout << "ish haqqi " << ob5.ish_haqqi << "$" << endl;
cout << "ishchinig yoshi " << ob5.yoshi << endl;
cout << "ishchining farzandi " << ob5.farzand << endl;
cout << endl;
int far, a[5] = {ob1.farzand, ob2.farzand, ob3.farzand, ob4.farzand, ob5.farzand }
for (int i = 0; i <= 4; i++) {
if (a[5]{ob1.farzand ==="Bor" || ob2.farzand ==="Bor" || ob3.farzand ==="Bor" || ob4.farzand ==="Bor" || ob5.farzand ==="Bor"}){
far= a[i];
cout << "farzandi bori" << far;
}
}
return 0;
}
Dostları ilə paylaş: