Can somebody detect where is the problem in my code?
write a function with input and no output that takes an array of 5 integers and prints the possible minimum and maximum summation of 4 of its numbers #include <stdio.h> #include <stdlib.h> int h[]={8,2,5,1,4}; int i,max,p,x,z,min,l,f,s,q; int k; int m[4]; int n[4]; int size=sizeof(h)/sizeof(int); void j(int h[],int size); int main() { j(h,size); printf("The min sum = %d",max); printf("The max sum = %d",f); } void j(int h[],int size){ for (i=0;i<size;i++){ for (p=i+1;p<size;p++){ if (h[i]>h[p]){ max=h[i];} } for (k=0;k<size;k++){ if(h[k]<max){ m[k]=h[k];}} z=m[0]+m[1]+m[2]+m[3]; } ////////////////// for (s=0;s<size;s++){ for (q=i+1;q<size;q++){ if (h[s]>h[q]){ min=h[q];} for (l=0;l<size;l++){ if(h[l]>min){ n[l]=h[l]; }} f=n[0]+n[1]+n[2]+n[3]; } } }