【C語言】輸入一個數,插入到一個有序數組中,並保持數組的有序性

1.數組 #include <stdio.h> void main(){ /* 輸出數組各元素*/ int i,key,loc; int a[10]={1,3,6,9,10,15,16,22,30}; for(i=0;i<9;i++){ printf(" %d",a[i]); } /*尋找插入位置*/ printf("\n\nPlease intput k
相關文章
相關標籤/搜索