Question: Algorithm: Maximum _ of _ Two _ Numbers Start the program. Declare a function called findMaximum, which takes two parameters ( num 1 and num

Algorithm: Maximum_of_Two_Numbers
Start the program.
Declare a function called findMaximum, which takes two parameters (num1 and num2) and returns the result value.
Declare two variables, num1 and num2, to store the two input numbers.
Read the values of num1 and num 2 from the user.
Call the findMaximum function and pass the values of num1 and num2 as arguments and store the returned value in a variable called maximum.
Print the value of maximum as the result.
End the program.
function findMaximum(num1, num2):
Compare the values of num1 and num2.
If num1 is greater than num2, return num1.
Otherwise, return num2.
End of function
What is the result of "Maximum_of _Two_Numbers"'algorithm if num1 and num2 are equal?
Pick ONE option
The program terminates with an error.
The program prints "Both numbers are equal."
 Algorithm: Maximum_of_Two_Numbers Start the program. Declare a function called findMaximum, which

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!