I have this finals lab exam wherein it became a take home exam for no freshmen understand and get the codes. We need to make a program that print out the highest value and the lowest value in an input array using functions. I really need your help. Thanks
I haven't done anything so far cause I don't have any idea. My prof didn't taught us about this but she gave it as an assignment. So i guess this is a general inquiry. I tried searching and done this one on our exam that became a take home. My prof told me that it is correct but we need to define first. Here's my code:
int num[5]
int x;
int y;
int max(int num1){
for (int z=0;z<5;z++){
y=num[z];
}
}
return y;
I only done the highest value. Here's the problem:
Create a program that holds an array containing 5 integers. Create two methods that accept the array. The first method named lowest returns the lowest from the 5 numbers while the second method returns the highest number from the list. Determine the highest and lowest numbers without sorting the numbers. Your output should contain the original list of number, the highest and the lowest number from the list. Supply the necessary values for the array.
Thanks for your time reading this.