//1-laboratoriya ishi (SWD_005-L3 )
//ALMAMATOV JAVLONBEK
//WIFE ROTUR
#include
#include
using namespace std;
class wife
{
private:
char kompaniyasi[25];
public:
int chastotasi;
char nomi[20];
int oyligi;
void input()
{
cout<<"kompaniyasi:";cin>>kompaniyasi;
cout<<"chastotasi:";cin>>chastotasi;
cout<<"nomi:";cin>>nomi;
cout<<"oylik tolovi:";cin>>oyligi;
}
void chiqar()
{
cout<
}
};
int main()
{
wife rotur[100],t;
int n;
cout<<"n=";cin>>n;
for(int i=0;i
{
cout<
rotur[i].input();
}
for(int i=0;i
{
for(int j=i+1;j
{
if(rotur[i].chastotasi>rotur[j].chastotasi)
{
t=rotur[i];
rotur[i]=rotur[j];
rotur[j]=t;
}
}
}
cout<
for(int i=0;i
rotur[i].chiqar();
system("Pause");
return 0;
}
Do'stlaringiz bilan baham: |