This is a Python program that takes three numbers as input from the user and then returns the maximum of the minimum number and the minimum of the other two numbers.
The program first prompts the user to enter three numbers using the input() function, and the int() function is used to convert the inputs to integers. The input values are then assigned to the variables num, a, and b.
The max() function is used to find the maximum of the minimum number (min(num, max(a, b))) and the minimum of the other two numbers (min(a, b)).
Here, min(num, max(a, b)) finds the minimum of num and the maximum of a and b. Then, min(a, b) finds the minimum of a and b. Finally, the max() function finds the maximum of the two minimum values.
num = int(input("Enter the Number :")) a = int(input("Enter the A Number :")) b = int(input("Enter the B Number :")) print(max(min(num, max(a, b)), min(a, b)))
Enter the Number :3 Enter the A Number :45 Enter the B Number :23 23
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions