mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
18 lines
216 B
Python
18 lines
216 B
Python
# NguyenU
|
|
|
|
|
|
def find_max(nums):
|
|
max = nums[0]
|
|
for x in nums:
|
|
if x > max:
|
|
max = x
|
|
print(max)
|
|
|
|
|
|
def main():
|
|
find_max([2, 4, 9, 7, 19, 94, 5])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|