Using namespace std; struct Qaychi{


Download 102.69 Kb.
Sana18.06.2023
Hajmi102.69 Kb.
#1568499
Bog'liq
6-lab



#include
using namespace std;
struct Qaychi{
string brend;
string materiali;
int uzinligi;
bool elektr;
bool buklanadigan;
bool chap_qul;
string rangi;
float materal_zichligi;
};
int main(){
Qaychi s1={"ideal","metaldan",10,false,true,true,"qizil",10.3};
Qaychi s2={"klassik","Qo'rg'oshindan",7,true,false,true,"qora",13.1};
Qaychi s3={"trend","Temirdan",12,false,false,true,"yashil",15.9};
Qaychi s4={"compos","kumushdan",9,true,true,true,"oq",6.3};
Qaychi Qaychi[4]={s1,s2,s3,s4};
float maks=0.0;
for(int i=0;i<4; i++){
if(Qaychi[i].materal_zichligi>maks){
maks=Qaychi[i].materal_zichligi;
}
}
for(int i=0; i<4; i++){
if(Qaychi[i].materal_zichligi==maks){
cout<<"brend="<cout<<"materiali="<cout<<"uzinligi="<cout<<"elektr="<cout<<"buklanadigan="<cout<<"chap_qul="<cout<<"rangi="<cout<<"material_zichligi="<}
}return 0;


}


#include
using namespace std;
struct DezaynerDasturchi{
string ismi;
string familiyasi;
int yoshi;
string ishjoyi;
int oyligi;
string TelifonR;
int ishKunlari;
float ishvaqti;
};
int main(){
DezaynerDasturchi s1={"sherozbek","shermatov",30,"kattaqo'rg'on",400000,"+998912334234",15,10.3};
DezaynerDasturchi s2={"Abdulaziz","g'aniyev",37,"urgut",1000000,"+996325556878",30,13.1};
DezaynerDasturchi s3={"Temur","Mansurov",42,"Zomin",5600000,"+9588588888888",12,15.9};
DezaynerDasturchi s4={"shohrux","vohidov",26,"ishtihon",450000,"+998334345675",23,6.3};
DezaynerDasturchi DezaynerDasturchi[4]={s1,s2,s3,s4};
int maks=0;
for(int i=0;i<4; i++){
if(DezaynerDasturchi[i].ishKunlari>maks){
maks=DezaynerDasturchi[i].ishKunlari;
}
}
for(int i=0; i<4; i++){
if(DezaynerDasturchi[i].ishKunlari==maks){
cout<<"ismi="<cout<<"familasi="<cout<<"yoshi="<cout<<"ishjoyi="<cout<<"oyligi="<cout<<"TelefonR="<cout<<"ishkunlari="<cout<<"ishvaqti="<}
}return 0;


}

Download 102.69 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling