程序说明:某一数组有10个整型元素,现在需要通过选择排序对其按照从小到大的顺序进行排序。请写出选择排序函数 void sort(int a[],int n) 。
# include <stdio.h> main() { void sort(int a[],int n); int a[10]={21,12,222,35,4,36,6,78,98,9},i; sort(a,10); find (a,b); for (i=0;i<10;i++) printf(“%d ”,a[i]); getch();} void sort(int a[],int n) { }