a = []
while True:
temp = int(input())
if temp != 0:
a.append(temp)
else:
break
if a != []:
print(max(a))
print(0)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Python:
a = []
while True:
temp = int(input())
if temp != 0:
a.append(temp)
else:
break
if a != []:
print(max(a))
else:
print(0)