/************************************************************************
*																		
* girilen bes sayi icin max ve min degerleri verir		
* derlemek icin: gcc -o program_ismi 6.c								
*																		
************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#define SIZE 5

void arr_sort(int arr[]) {

 int n, m, temp;

 for (m=0; m<SIZE-1; m++)  {
 	for (n=0; n<SIZE-1; n++) {
          	
          	if (arr[n]>arr[n+1]) {
			 
			   temp=arr[n];
			   arr[n]=arr[n+1];
			   arr[n+1]=temp;
			 
			  }
    	 }
 }
 	 
}


void arr_print(int arr[]) {

 int n;

 for (n=0; n<SIZE; n++)
 	printf("%d \t", arr[n]);
 	
 printf("\n");
   
}


int main()
{
    
		
	int array[SIZE] = {};
    int i;
	
        
    printf("Enter %d numbers:\n", SIZE);
        
    
    for (i=0; i<SIZE; i++)
    scanf("%d", &array[i]);
    
    arr_sort(array);
    arr_print(array);
   
    
    system("PAUSE");
    return 0; 
}


