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
|
1022 Discussions
|
Please Login in order to post a comment
if name == 'main': a = 10 b = 8 print(f"{a + b}\n{a - b}\n{a * b}")
a = int(input()) b = int(input())
add=a+b sub=a-b mul=a*b print(add) print(sub) print(mul)
print(a+b , a-b, a*b, sep="\n")
Separator will do perform commas in print section it will take action i will be separed when the separator \n command .
You can try these guys simplest in one line.