Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  try
Language: C/C++
Code:
#include<stdio.h>
#include<conio.h>
int main()
{
     int a[10],temp,j,i;
     printf("enter the values of array");
     for(i=0;i<10;i++)
     {
          scanf("%d",a[i]);
     }
     for(i=1;i<10;i++)
     {
          temp=a[i];
          for(j=i-1;i>=0 && a[i]>temp; i--)
               a[j+1]=a[j];
          a[j+1]=temp;
     }
     for(i=0;i<10;i++)
     {
          printf("%d",a[i]);
     }
getch();
return 0;
}

          
          
Comments: