#include #include typedef struct ogrenci { char ad[20]; char soyad[20]; float ort; } Ogrenci; void veriGir(Ogrenci *o){ scanf("%s%s%f",o->ad,o->soyad,&o->ort); } void sort(struct ogrenci o[3],int n){ int j,i; for(**1;iad,o[j+1]->ad); strcpy(o[j]->soyad,o[j+1]->soyad); o[j]->ort=o[j+1]->ort; //o[j+1] = temp; strcpy(o[j+1]->ad,temp->ad); strcpy(o[j+1]->soyad,temp->soyad); o[j+1]->ort=temp->ort;*/ Ogrenci temp = o[j]; o[j] = o[j + 1]; o[j + 1] = temp; } } } } int main(){ Ogrenci o[3]; int indexes[3]; int **0; for(i;i<3;i++){ printf("%d. adı,soyadı,ortalamasını giriniz : ",i+1); veriGir(&o[i]); } printf("-----------LİSTE-----------\n"); sort(o,3); **0; for(i;i<3;i++){ printf("%s %s %2f",o[i].ad,o[i].soyad,o[i].ort); } printf("\n"); }