编写程序,用选择法对10个整数按从小到大顺序排序

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/01 23:25:51
编写程序,用选择法对10个整数按从小到大顺序排序

编写程序,用选择法对10个整数按从小到大顺序排序
编写程序,用选择法对10个整数按从小到大顺序排序

编写程序,用选择法对10个整数按从小到大顺序排序
#include
void sort(int array[],int n)
{ // n 为数组元素个数
\x09int i,j,k,temp; // i 为基准位置,j 为当前被扫描元素位置,k 用于暂存出现的较小的元素的位置
\x09for(i=0;i