编写程序,用选择法对10个整数按从小到大顺序排序
来源:学生作业帮助网 编辑:六六作业网 时间:2025/02/07 01:38:47
编写程序,用选择法对10个整数按从小到大顺序排序编写程序,用选择法对10个整数按从小到大顺序排序编写程序,用选择法对10个整数按从小到大顺序排序#includevoidsort(intarray[],
编写程序,用选择法对10个整数按从小到大顺序排序
编写程序,用选择法对10个整数按从小到大顺序排序
编写程序,用选择法对10个整数按从小到大顺序排序
#include
void sort(int array[],int n)
{ // n 为数组元素个数
\x09int i,j,k,temp; // i 为基准位置,j 为当前被扫描元素位置,k 用于暂存出现的较小的元素的位置
\x09for(i=0;i