#include <stdio.h>
#define SIZE 10
void Fun_sort (int *,int );
int main (void )
{
int a[SIZE];
unsigned int i;
printf ("Input %d numbers\n",SIZE);
for (i=0;i<SIZE;i++)
scanf ("%d",&a[i]);
printf ("Negative sequence output:\n");
for (i=SIZE;i>0;printf ("%d ",a[i]))
i--;
printf ("\n");
Fun_sort (a,SIZE);
return 0;
}
void Fun_sort (int *pt,int size)
{
unsigned int i,j;
int m=0;
for (i=0,j=i+1;j<=size;)
{
if (pt[i]<=pt[j])
j++ ;
else
{
m=pt[j];
pt[j]=pt[i];
pt[i]=m;
}
if (j==size)
{
i++;
j=i+1;
}
}
printf ("Sorted min to max:\n");
for (i=0;i<size;i++)
printf ("%d ",pt[i]);
printf ("\n");
return ;
}