s_1 = list(map(int,input("input sequence of natural numbers:\n").split()))
pos, neg = 1, 1
for num in s_1:
if num > 0:
pos *= num
elif num < 0:
neg *= num
if abs(pos) > abs(neg):
print("product of positive numbers greater")
elif abs(pos) < abs(neg):
print("product of negative elements greater")
else:
print("product of negative elements eqval product of positive numbers")
Comments
Leave a comment