Respuesta :
Answer:
The solution code is written in Python
- def max(a, b):
- if(a > b):
- return a
- else:
- return b
- num1 = int(input("Please input the first number: "))
- num2 = int(input("Please input the second number: "))
- print(max(num1, num2))
Explanation:
Firstly create a function max that accepts two input, a and b, as required by question (Line 1). In the function, create if statement to check if a greater than b return a and vice versa (Line 2 -5).
In the main program (Line 7 - 10), prompt user to input two numbers (Line 7 - 8). At last call the function by passing num1 and num2 as arguments and print the result (Line 10).