Respuesta :
// writing c++ function
int maximum ( int a , int b){
if(a>b)
return a;
else
return b;
}
//when this function will be called it will return the max of the integers sent.
//for example
int max = maximum ( 3,4)
//max variable will have 4 returned by the function
Answer:
#section 1
def max(int1, int2):
if a > b:
return a
else:
return b
#section 2
print("------Enter Two Integers----------\n\n")
a = int(input('Enter First Integer:'))
b = int(input('Enter Second Integer'))
print(max(a, b))
Explanation:
The programming language used is python 3.
#section 1
The function is defined and it has two parameters (int1 and int2) that allows it to take two arguments.
The IF and ELSE statements compares both parameters and return the highest.
#section 2
A program is written to prompt the user for two inputs, and converts them to an integer, passes it to the max function and prints the result to the screen
