Skip to content

Commit a64d048

Browse files
committed
Output program finds if multiplication is negative, positive or zero.
1 parent 7335143 commit a64d048

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
def nums(first, second, third):
2+
if (first > 0 and second > 0 and third > 0) or \
3+
(first > 0 > second and third < 0) or \
4+
(second > 0 > first and third < 0) or \
5+
(third > 0 > first and second < 0):
6+
7+
return "positive"
8+
9+
elif first < 0 or second < 0 or third < 0:
10+
return "negative"
11+
12+
elif first == 0 or second == 0 or third == 0:
13+
return "zero"
14+
15+
16+
first_num = int(input())
17+
second_num = int(input())
18+
third_num = int(input())
19+
20+
print(nums(first_num, second_num, third_num))

0 commit comments

Comments
 (0)