C语言中如何用选择法将10 个整数排序

[复制链接]
查看11 | 回复2 | 2016-2-6 06:24:46 | 显示全部楼层 |阅读模式
C语言中如何用选择法将10 个整数排序

回复

使用道具 举报

千问 | 2016-2-6 06:24:46 | 显示全部楼层
#includevoid main() { void sort(int arry[],int n);//函数声明 int a[10],i; printf("enter the array:\n"); for(i=0;i<10;i++) //输入十个数scanf("%d",&a); sort(a,10);//调用排序函数 printf("the sorted array:\n"); for(i=0;i<10;i++) //输出十个数printf("%5d",a); printf("\n"); } void sort(int array[],int n)//排序函数 ...
回复

使用道具 举报

千问 | 2016-2-6 06:24:46 | 显示全部楼层
随便找本书上都有冒泡和选择排序法...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行