why my if else if else if statement is not working?
printf ("Enter 1 for midtern1 sorting , 2 for midterm2 sorting , 3 for final sorting\n");
scanf ("%d",sort);
if (sort=1){
midterm1(x);
for (i=9;i>=0;i--){
printf ("%s %s %d\n",x[i].name,x[i].surname,x[i].mid1);}}
else if (sort=2){
midterm2(x);
for (i=9;i>=0;i--){
printf ("%s %s %d\n",x[i].name,x[i].surname,x[i].mid2);}}
else if (sort=3){
final(x);
for (i=9;i>=0;i--){
printf ("%s %s %d\n",x[i].name,x[i].surname,x[i].final);}}
i tried (sort==1), (sort<=1) but still same result.