Find the maximum element of array

This program finds largest element from the matrix a[].First the input is accepted from user. The value from the 0th location is considered as maximum value and stored in variable max. Then it is compared with every value of the array using for loop.If any value is larger than the variable max then that value is assigned to variable max.At the end of for loop, maximum value from the array a[] is searched.

#include < stdio.h >
#include < conio.h > 
void main()
{
	int a[100],max,i,n;
	clrscr();
	printf("Enter the size of array\n");
	scanf("%d",&n);
	printf("Enter the elements of array\n");
	for(i=0;i < n;i++)
	{
		scanf("%d",&a[i]);
	}
	max=a[0];
	for(i=0;i < n;i++)
	{
		if(a[i]>max)
		{
			max=a[i];
		}	
	}
	printf("The max of the given array is %d",max);
	getch();
}