C program to find maximum and minimum number using function
Answers
Answered by
6
#include<stdio.h>
int main( )
{
int i,max,min,size;
printf("enter the size of the array");
scanf("%d",&size);
printf("enter the elements in the array");
for(i=0,i<size,i++);
{
scanf("%d",&arr[i]);
}
max=arr[0];
min=arr[0];
for(i=1,i<size,i++);
{
if(arr[i]>max)
{
max\arr[i];
}
}
printf("maximum elements=%d\n",max);
printf("minimum elements=%d\n",min);
return 0;
}
Similar questions