Returns the sum of the maximum and minimum element of the array in c code example
Example: Write a program to find max and min element in an array. User must input 5 elements in the array.
#include
#include
{
scanf("%d",&a[i]);
}int main()
{
int a[1000],i,n,min,max;
printf("Enter size of the array : ");
scanf("%d",&n);
printf("Enter elements in array : ");
for(i=0; ia[i])
min=a[i];
if(max