GAMECORE Posted January 4, 2018 Posted January 4, 2018 Task: Implementați o funcție care are 3 numere ca parametrii și returnează cel mai mare numar dintre ele. Faceți acest lucru fără a utiliza funcția max () din python. def max(a, b, c): maxim = 0 if a > b: if a > c: maxim = a else: maxim = c else: maxim = b if b > c: maxim = b else: maxim = c return maxim if __name__ == "__main__": print("Introduceti cele 3 numere:") a = int(input("a = ")) b = int(input("b = ")) c = int(input("c = ")) print("Maximul dintre cele 3 numere este: %s " %max(a, b, c))
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now