-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharithmetic_operators.py
More file actions
45 lines (35 loc) · 888 Bytes
/
arithmetic_operators.py
File metadata and controls
45 lines (35 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""
TASK:-
Read two integers from STDIN and print three lines where:
1. The first line contains the sum of the two numbers.
2. The second line contains the difference of the two numbers (first - second).
3. The third line contains the product of the two numbers.
INPUT FORMAT:-
The first line contains the first integer, a. The second line contains the second integer, b.
CONSTRAINTS:-
1 <= a <= 10^10
1 <= b <= 10^10
OUTPUT FORMAT:-
Print the three lines as explained above.
SAMPLE INPUT 0:-
3
2
SAMPLE OUTPUT 0:-
5
1
6
cls
EXPLAINATION 0:-
3 + 2 ==> 5
3 - 2 ==> 1
3 * 2 ==> 6
"""
# SOLUTIONS:-
def arithmetic(a,b):
print('The sum of a and b is: ', a + b)
print('The subtraction of a and b is: ', a - b)
print('The product of a and b is : ', a * b)
if __name__ == "__main__":
a = int(input().strip())
b = int(input().strip())
arithmetic(a,b)