/*11.Talabalar familiyalarini alifbo tartibida.*/
#include
using namespace std;
void print(vector names){
printf(".............................\n");
for(int i=0;i
cout<
printf("\n");
}
bool mycomp(string a, string b){
return a
}
vector Saralayman(vector a){
int n=a.size();
sort(a.begin(),a.end(),mycomp);
return a;
}
int main()
{
int n;
printf("Talabalr sonini kiriting: ");
scanf("%d",&n);
vector names;
string name;
printf("Talabalarning F.I.SH larini kiriting: \n");
for(int i=0;i
cin>>name;
names.push_back(name);
}
names=Saralayman(names);
printf("SARALANDI!\n");
print(names);
return 0;
}
Do'stlaringiz bilan baham: |