Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Given three numbers, represented by three variables, write a piece of code which displays the maximum
- # of them, at stdout. Use only if/else/elif and print statements.
- a = 1
- b = 2
- c = 3
- if a > b:
- if a > c:
- print(f"a={a} max")
- elif a > c:
- if a > b:
- print(f"a={a} max")
- elif b > a:
- if b > c:
- print(f"b={b} max")
- elif b > c:
- if b > a:
- print(f"b={b} max")
- else:
- print(f"c={c} max")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement