Question #302609

You are given space separated integers as input.



Write the program to print the maximum number among the given numbers

Expert's answer

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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS