We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Arithmetic Operators
Arithmetic Operators
Sort by
recency
|
1244 Discussions
|
Please Login in order to post a comment
print(a + b, a - b, a * b, sep='\n')
We read two integers from input and store them in variables a and b. Then we perform basic arithmetic operations.
First print the sum using a + b
Second print the difference using a - b
3.Third print the product using a * b
Code For if not understand:
a = int(input()) b = int(input())
print(a + b) print(a - b) print(a * b)
a = int(input()) b = int(input())
print(a + b) print(a - b) print(a * b)
print(a+b), print(a-b), print(a*b)
a,b=int(input().strip()),int(input().strip()) print(a+b,"\n',a-b,"\n",a*b)