Write a program with 1d array with 50 elements.The program should find the maximum and minimum value.Find the average
So @cliffy what have you tried to do so far? Care to share the code with us?
Is this homework?
I can give you some hints, you can use
for(int i = 0;i < 50;i++)
if(max < arr[i])
max = arr[i];
else if(min > arr[i])
min = arr[i];
BTW, this has some flaws, but since this is your homework not mine you should try to make it idiot proof, not me!
Last edited on
Topic archived. No new replies allowed.