Husenov Jamshid


Download 26.96 Kb.
Sana24.11.2021
Hajmi26.96 Kb.
#463336
Bog'liq
Mt 1-lab ishi
Government-Debt-and-Economic-Growth, Hayot havsizligi, MUHAMMAD AL

712_20 Husenov Jamshid

Talabalar ism-familiyasi, yoshi va ballaridan iborat jadval yarating va talabalarni ism-familiyasini alfavit bo„yicha tartibga keltiring.

#include

#include

using namespace std;

int main(int args, char *argv[])

{

int n; cout<<"talabalar sonini kiriting=";cin>>n;



struct table{

int t;


char FIO[20];

int yoshi;

int bali;

} talaba[n];

cout<

for(int i=0;i

talaba[i].t=i+1;

cin>>talaba[i].FIO;

}

cout<<" talaba yoshini kiriting- "<

for(int i=0;i

talaba[i].t=i+1;

cin>>talaba[i].yoshi;

}

cout<<" talabaning yiqqan balini kiriting- "<

for(int i=0;i

talaba[i].t=i+1;

cin>>talaba[i].bali;

}

int l=0;



for(int i=0;i

for(int j=n-1;j>i;j--){

if (strcmp(talaba[j-1].FIO,talaba[j].FIO)==1){

l++;


table k=talaba[j];

talaba[j]=talaba[j-1];

talaba[j-1]=k;

}

}



}

for(int i=0;i

cout<<"| "<

system("PAUSE");



}


Download 26.96 Kb.

Do'stlaringiz bilan baham:




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