int t,h=o no[50];
a=fopen(fopen("c:\\monam.txt","rb");
rewind(a);
if(a==0)
{
printf("error");
getch();
exit(1);
}
fscanf(a,"%d%s%d%d%d",&st.nu,&st.name,&st.arbic,&st.english,&st.c);
while(!feof(a)
{
st.nu==no[h];
h++
fscanf(a,"%d%s%d%d%d",&st.nu,&st.name,&st.arbic,&st.english,&st.c);
}
fclose(a);
for(int i=0;i<h;i++)
for(int j=0;j<h;j++)
if(no[j]>no[j+1])
int temp=no[j];
no[j]=no[j+1];
no[j+1]=temp;
}
for(int r=0;r<h;r++)
{
printf("\n%d",no[r]);
}
printf("\n \t to pack press 0");
scanf("%d",&t);
if(t==0)
getch();
goto w;
}تم تعديل هذه المشاركة بواسطة مصطفى 36a2 في 18 مارس 2016 في 14:34 — السبب: إضافة وسم الشيفرة البرمجية