how to code a program which accepts a list of numbers and calculate the maximum of the list of numbers using two function

Solution
You didn't state what language it should be written in... I won't do your homework for you but here's a hint:

Create a variable to store the high number, then put the first number in the list/array in that variable, then check each number against the high number using an if statement:

If (array[currentNumber] > highNumber) {

highNumber = array[currentNumber];

}

JeckeL

Distinguished
Jul 19, 2009
223
1
18,910
You didn't state what language it should be written in... I won't do your homework for you but here's a hint:

Create a variable to store the high number, then put the first number in the list/array in that variable, then check each number against the high number using an if statement:

If (array[currentNumber] > highNumber) {

highNumber = array[currentNumber];

}
 
Solution