You are given space separated integers as input.
Write the program to print the maximum number among the given numbers
arr=[]
print("Enter integers (space separated): ", end='')
a = input().split()
for i in range(len(a)):
arr.append(int(a[i]))
max = arr[0]
for i in range (len(arr)):
if max < arr[i]:
max = arr[i]
print("Maximum number: ", max)
Comments
Leave a comment