nord vpnnord vpn
Ad

tìm số lớn nhất số nhỏ nhất

mail@pastecode.io avatar
unknown
python
7 months ago
466 B
3
Indexable
Never
numbers = input("Enter a list of numbers separated by spaces: ").split()
# Chuyển chuỗi đầu vào thành danh sách các số

numbers = [int(x) for x in numbers] # Chuyển đổi tất cả các phần tử của danh sách thành số nguyên

max_num = max(numbers) # Tìm số lớn nhất trong danh sách
min_num = min(numbers) # Tìm số nhỏ nhất trong danh sách

print("The maximum number is:", max_num)
print("The minimum number is:", min_num)

nord vpnnord vpn
Ad