a=list(map(int,input().split()))
l=0
r=1
minsum=a[0]+a[1]
for i in range(len(a)):
for j in range(i+1,len(a)):
s=a[i]+a[j]
if(abs(minsum)>abs(s)):
minsum=s
l=i
r=j
print("the two elements are ",a[l],a[r])
output
the two elements are 1 2
No comments:
Post a Comment