1
2
3
#include
using namespace std;
struct davlat
{string CountryName;
string CountryCapital;
float CountrySquare;
int CountryPeople;
};
int main()
{int m,n=0;
string y;
cout<<"Davlatlar sonini kiriting: "; cin>>m;
for(int i=1; i<=m; i++)
{ davlat a[1000];
cout<>a[i].CountryName;
cout<>a[i].CountryCapital;
cout<>a[i].CountrySquare;
cout<>a[i].CountryPeople;
if(a[i].CountrySquare>n)
{n=a[i].CountrySquare;
y=a[i].CountryName;
}}cout<
return 0;}
#include
#include
using namespace std;
struct Ball
{string ColorBall;
float RadiusBall;};
int main()
{int m,n=0,l=9999999;
string y1,y2;
double v1,v2;
cout<<"Sharlar sonini kiriting: "; cin>>m;
for(int i=1; i<=m; i++)
{ Ball a[1000];
cout<>a[i].ColorBall;
cout<>a[i].RadiusBall; v1=4./3*M_PI*(a[i].RadiusBall*a[i].RadiusBall*a[i].RadiusBall);
if(v1>n)
{n=v1;
y1=a[i].ColorBall;} v2=4./3*M_PI*(a[i].RadiusBall*a[i].RadiusBall*a[i].RadiusBall);
if(v2
{l=v2;
y2=a[i].ColorBall;}
}cout<
cout<
cout<<"eng kattani eng kichikka nisbati: "<
return 0;}
#include
#include
using namespace std;
struct oquvchi
{ string surname;
string name;
string fathername;
int young;};
void oquvchimalumot(oquvchi malumot)
{
cout<<"surname: "<
cout<<"name: "<
cout<<"fatherName: "<
cout<<"young: "<
}
int main()
{int n=10, a[n],m=7,p=0, q=21;
srand(time(NULL));
for(int i=1; i<=10; i++)
{
a[i]=rand()%100;
if(a[i]>90)
a[i]=a[i]-80;
else
if(a[i]>80&&a[i]<=90)
a[i]=a[i]-70;
else
if(a[i]>70&&a[i]<=80)
a[i]=a[i]-60;
else
if(a[i]>60&&a[i]<=70)
a[i]=a[i]-50;
else
if(a[i]>50&&a[i]<=60)
a[i]=a[i]-40;
else
if(a[i]>40&&a[i]<=50)
a[i]=a[i]-30;
else
if(a[i]>30&&a[i]<=40)
a[i]=a[i]-20;
else
if(a[i]>=20&&a[i]<=30)
a[i]=a[i]-10;
if(a[i]<5)
a[i]=a[i]+m;
m++;
if(a[i]>p)
p=a[i];
if(a[i]q=a[i];
}
oquvchi m1={"Tolliboyev","Ilyos","Akrom",a[1]};
oquvchi m2={"Rustamov","Ozodbek","Ali",a[2]};
oquvchi m3={"Qarshiyeva","Muborak","Sherzod",a[3]};
oquvchi m4={"Karimov","Doston","Sherzod",a[4]};
oquvchi m5={"Abdiyev","Lochin","Bahodir",a[5]};
oquvchi m6={"Qo'chqorov","Diyor","Fayzullo",a[6]};
oquvchi m7={"Qilichov","Sanjar","Po'lat",a[7]};
oquvchi m8={"Rustamov","Jahongir","Allayor",a[8]};
oquvchi m9={"Ergashova ","Umida","G'ofur",a[9]};
oquvchi m10={"Umarova","Shodiyona","Dilshod",a[10]};
oquvchimalumot(m1); cout<<"========"<
oquvchimalumot(m3); cout<<"========"<
oquvchimalumot(m5); cout<<"========"<
oquvchimalumot(m6); cout<<"========"<
oquvchimalumot(m9); cout<<"========"<
cout<<"eng katta yoshli o'quvchi eng kichigidan "<
return 0;}
#include
using namespace std;
struct FootballTeam
{string nomi;
int ochko;};
int main()
{int n=3,min1=114,s=0;
string a1[n];
int a2[n];
FootballTeam a[2*n];
for(int i=1;i<=n;i++)
{cout<>a[i].nomi;
a1[i]=a[i].nomi;
a[i].ochko=rand()%100;
cout<
a2[i]=a[i].ochko;
if(min1>a2[i])min1=a2[i];}
for(int i=1;i<=n;i++)
{if(min1==a2[i])s++;}
cout<
if(s==1)cout<<" Eng kam ochko: "<
for(int i=1;i<=n;i++)
{if(min1==a2[i])cout<<"Eng kam ochko to'plagan jamoa: "<
return 0;}
#include
using namespace std;
struct abonent
{string ism;
int codi;};
int main()
{ int n,u=0,b=0 ,j=0;
string d[50];
cout<<"talabalar sonini kiriting : "; cin>>n;
for(int i=1; i<=n; i++)
{ abonent a[100];
cout<>a[i].ism;
cout<>a[i].codi;
if(a[i].codi==93||a[i].codi==94)
u++;
if(a[i].codi==90||a[i].codi==91)
{ d[j]=a[i].ism;
b++; j++;}}
cout<<"beeline ishlatuvchilar:"<
for(int i=0; i<=j; i++)
{cout<
cout<<"ucell abonentlari soni "<
cout<<"beeline abonentlari soni "<
if(u>b)
cout<<"ucell abonentlari soni ko'proq"<
else
if(b>u)
cout<<"beeline abonentlari soni ko'proq"<
else cout<<"ikkala operator abonentlari soni teng";
return 0;}
#include
using namespace std;
struct Example
{string Name;
string Surname;
string FatherName;
int Points;};
int main()
{int m,n=0,j=0;
string y[100];
cout<<"talabalar sonini kiriting: "; cin>>m;
for(int i=1; i<=m; i++)
{Example a[1000];
cout<>a[i].Name;
cout<>a[i].Surname;
cout<>a[i].FatherName;
cout<>a[i].Points;
if(a[i].Points<=2)
{y[j]=a[i].Name; j++;}}
cout<<"yiqilgan talabalar ro'yxati: "<
for(int i=0; i
cout<
return 0;}
#include
#include
using namespace std;
struct jamoalar
{string nomi;
int ochko, id;};
struct chempionlar
{string nom;
int achko, ID;};
int main()
{int n;
cout << "2000-yildan 2020-yilgacha jamoalarning yillar bo'yicha ochkolarini kiriting" << endl;
cout<<"jamoalar sonini kiriting"<
cout<<"n="; cin>>n;
jamoalar *a=new jamoalar[n];
chempionlar *b=new chempionlar[21];
int j=2000,k=0,maxochko=0,max1;
for(int i=0; i
{if(i==0)cout<
cout<<1+i<<"-jamoa nomi "; cin>>a[i].nomi;
cout<<"uning ochkosi "; cin>>a[i].ochko;
a[i].id=j;
cout<
if(maxochko
{maxochko=a[i].ochko;
max1=i;}
if(i==n-1)
{b[k].nom=a[max1].nomi;
b[k].ID=j;
b[k].achko=maxochko;
k++;
j++;
i=-1;
maxochko=0;}}
j=0;
max1=0;
maxochko=0;
k=0;
for(int i=0; i<3; i++)
{for(j=0; j<3; j++)
{if(b[i].nom==b[j].nom)k++;}
if(maxochko
{maxochko=k;
k=0;
max1=i;}}
cout<
j=0;
max1=0;
maxochko=0;
k=0;
for(int i=0; i<3; i++)
{for(j=0; j<3; j++)
{if((b[i].nom==b[j].nom)&&(maxochko
{maxochko=b[j].achko;
max1=j;}}}
cout<
delete[] a;
delete[] b;
return 0;}
#include
using namespace std;
struct Cars
{string CarName;
int Dvigatels;
int fuel;
int speed;};
int main()
{int m,n=0;
string y;
cout<<"tanlangan mashinalar sonini kiriting: "; cin>>m;
for(int i=1; i<=m; i++)
{Cars a[100];
cout<>a[i].CarName;
cout<>a[i].Dvigatels;
cout<>a[i].fuel;
cout<>a[i].speed;
if(a[i].speed>n)
{n=a[i].speed;
y=a[i].CarName;}}
cout<<"Jhongir tanlagan avtomobil nomi: "<
return 0;}
#include
using namespace std;
struct height
{string Name;
string Jinsi;
float buyi;};
int main()
{int m,n=0,j=0;
float s1=0,s2=0;
string y[100];
cout<<"talabalar sonini kiriting: "; cin>>m;
for(int i=1; i<=m; i++)
{height a[100];
cout<>a[i].Name;
cout<>a[i].Jinsi;
cout<>a[i].buyi;
if(a[i].Jinsi=="erkak")
{s1=s1+a[i].buyi;}
if(a[i].Jinsi=="ayol")
{s2=s2+a[i].buyi;}}
cout<<"bo'ylar orasidagi farq: "<
return 0;}