Write a program to find a maximum of given three numbers (Use ternary operator) in python
Code
print("Enter three numbers to find the maximum")a = int(input("a: "))b = int(input("b: "))c = int(input("c: "))max = a if a > b and a > c else b if b > c else cprint("The maximum is", max)
0 Comments
Post a Comment