Problem:
Write a program to enter two numbers and perform all arithmetic operations
Code:
a = int(input("Enter first number "))
b = int(input("Enter second number "))
# perform arithmetic operation
print()
print('Addition of a and b is', a + b)
print('Subtraction of a and b is', a - b)
print('Division of a and b is', a / b)
print('Product of a and b is', a * b)
print('Modulus of and b is', a % b)
Output:

No comments: