Arithmetic Operators

Sort by

recency

|

1244 Discussions

|

  • + 0 comments

    print(a + b, a - b, a * b, sep='\n')

  • + 0 comments

    We read two integers from input and store them in variables a and b. Then we perform basic arithmetic operations.

    1. First print the sum using a + b

    2. 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)

  • + 0 comments

    a = int(input()) b = int(input())

    print(a + b) print(a - b) print(a * b)

  • + 0 comments

    print(a+b), print(a-b), print(a*b)

  • + 0 comments

    a,b=int(input().strip()),int(input().strip()) print(a+b,"\n',a-b,"\n",a*b)