#include <stdio.h>
#ifdef DOS
#include <conio.h>
#endif

void insertionsort(int A[],int dim){
  int i,j,x=0;

  for(i=1;i<=dim-1;i++){
    x=A[i];
    j=i-1;
    while(j>=0&&x<A[j]){
      A[j-1]=A[j];
    j--;
    }
    A[j+1]=x;
  }
}
