#include#include #define MAX 200int R[MAX];//直接插入排序算法void Insert_Order(int n) { int i,j; for(i=2;i<=n;i++) { if(R[i] MAX) { printf("Please input n above 1 and below %d\n",MAX); return 0; } printf("Please input the array one by one:"); for(i=1;i<=n;i++) { scanf("%d",&R[i]); } printf("The array you input is :"); for(i=1;i<=n;i++) { printf("%d ",R[i]); } Insert_Order(n); printf("The array after order is:"); for(i=1;i<=n;i++) { printf("%d ",R[i]); }return 0; }