To calculate the maximum amount of sum, minimum and array elements, this program - maximum value is problem, it is always true Is not
zero main (zero) {int degree [3] [2]; Int min_max [] []; Int max = min_max [0] [0]; Int min = min_mx [0] [0]; Int i, j; Int sum = 0; Clrscr (); For (i = 0; i max) {max = min_max [ii] [j]; }} Printf ("Minimum of, \ n is the minimum degree% d of the student number% D"); Printf ("\ nThe maximum amount of student number% D is% d", i, max); Getch (); }
The problem is that you are starting min_max minimum and maximum [0 ] [0] before min_max to assign any value, so their content is actually undefined.
assignment minimum = least_exax [0] [0]
and maximum = minimum_max [0] [0]
scanf
After the call.
Comments
Post a Comment