程序代码:
#include "stdio.h"
void main()
{
int str1[20] = {1,3,5,7,9,11,13,15,17};
int i,a;
printf("please input number:");
scanf("%d",&a);
for(i = 8;i >= 0;i--)
if(a <= str1[i])
str1[i+1] = str1[i];
else break;
str1[i+1] = a;
for(i = 0;i < 10;i++)
printf("%d ",str1[i]);
}