#include
#define N 10 //Define the number of array elements
main()
{
int a[N],i,max;
printf("Please enter %d array elements:\n",N);
scanf ("%d",&a[0]);
max=a[0];//Temporarily record the first value as the maximum value
for(i=1 ;i { scanf("%d",&a[i]); if(a[i]>max)//Find the maximum value max=a[i]; } for(i=0; i { printf("%-5d",a[i]);//Output array elements if(( i+1)%3==0)//3 elements per line printf("\n"); } printf(" \n"); printf("The maximum element is %d\n",max);//Output the maximum value }