Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Algorithm: Maximum _ of _ Two _ Numbers Start the program. Declare a function called findMaximum, which takes two parameters ( num 1 and num
Algorithm: MaximumofTwoNumbers
Start the program.
Declare a function called findMaximum, which takes two parameters num and num and returns the result value.
Declare two variables, num and num to store the two input numbers.
Read the values of num and num from the user.
Call the findMaximum function and pass the values of num and num as arguments and store the returned value in a variable called maximum.
Print the value of maximum as the result.
End the program.
function findMaximumnum num:
Compare the values of num and num
If num is greater than num return num
Otherwise, return num
End of function
What is the result of "Maximumof TwoNumbers"'algorithm if num and num are equal?
Pick ONE option
The program terminates with an error.
The program prints "Both numbers are equal."
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started