A complex expression

Report a typo

Write a program that takes a single integer number n and then performs the following operations in the following order:

  • adds n to itself

  • multiplies the result by n

  • subtracts n from the result

  • exactly divides the result by n (that means, you need to carry out integer division).

Then print the result of the division. The example is given below:

  • 8 + 8 = 16

  • 16 * 8 = 128

  • 128 - 8 = 120

  • 120 // 8 = 15

  • The result is 15

The variable n is already defined.

Use parentheses to specify the order of execution!

Sample Input 1:

8

Sample Output 1:

15
Write a program in Python 3
# don't change this line
n = int(input())

# write your code here
___

Create a free account to access the full topic