#include <iostream>
#include <limits>
#include<stdlib.h>
using namespace std;
void insertSort(int *A,int len){
if(A==NULL||len<=0)return;
for(int i = 1;i<len-1;i++){
int temp = A[i];
int index = i-1;
while(index>=0&&A[index]>temp){
A[index+1] = A[index];
--index;
}
A[index+1] = temp;
}
return;
}
int main(int argc, char** argv) {
int A[9];
A[0]=0;
A[1]=3;
A[2]=4;
A[3]=-1;
A[4]=9;
A[5]=7;
A[6]=8;
A[7]=8;
A[8]=80;
A[9]=-90;
insertSort(A,10);
for(int i = 0;i<10;i++){
cout<<A[i]<<",";
}
cout<<endl;
return 0;
}