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

#include <stdio.h>
#include <stdlib.h>


int main()
{
    
	int size;
	 
	printf("Enter the size of the array:\n");
	
	scanf("%d", &size);
	
	int array[size];
    int i;
	    
    printf("Enter %d numbers:\n", size);
        
    
    for (i=0; i<size; i++)
    scanf("%d", &array[i]);
    
    
    int min = array[0], max = array[0];
    
	for (i = 1; i < size; i++){
    	if (min > array[i]) min = array[i];
        if (max < array[i]) max = array[i];
    } 
    
    printf("Maximum : %d and minimum : %d\n", max, min);
    
    system("PAUSE");
    return 0; 
}

