void main () {
Int I, j, a [10], temp.
For (I=0; i <10; I++)
The scanf (" % d ", & amp; A [I]);
printf("\n");
For (I=0; i <9. I++)
For (j=I + 1; J & lt; 10; J++)
If (a [j] Temp=a, [I].
A [I]=a, [j].
A [j]=temp;
}
For (I=0; i <10; I++)
Printf (" % d "6, a [I]);
}
CodePudding user response:
No problem, bubble sort, I would like to ask what?CodePudding user response:
Inverse buy just need to exchange, fore and aft of the array output, or directly backwards
#include
# define MAX 10
Void main () {
Int I, j, a (MAX), temp.
For (I=0; iThe scanf (" % d ", & amp; A [I]);
printf("\n");
For (I=0; iTemp=a, [I].
A [I]=a, [MAX - I - 1].
A [MAX - I - 1)=temp.
}
For (I=0; iPrintf (" % d "6, a [I]);
}
CodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.htmlI hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html