Problem: Arithmetic Operators
The provided code stub reads two integers from STDIN, a and b. Add code to print three lines where:
- The first line contains the sum of the two numbers.
- The second line contains the difference of the two numbers (first – second).
- The third line contains the product of the two numbers.
Print the following:
8 -2 15
The first line contains the first integer, .
The second line contains the second integer, .
Print the three lines as explained above.
Sample Input 0
Sample Output 0
5 1 6
if __name__ == '__main__': a = int(input()) b = int(input()) print(a+b) print(a-b) print(a*b)
Disclaimer: This problem is originally created and published by HackerRank, we only provide solutions to this problem. Hence, doesn’t guarantee the truthfulness of the problem. This is only for information purposes.