Module: (C++) For loop operator. Typical tasks


Problem

6 /16


Multiplication sum

Problem

For a given positive integer n≥2, calculate the sum 1 × 2 + 2 × 3 + ... + (n-1) × n. Output the answer in the form of a calculated expression and its value exactly as shown in the example.

Input: A natural number is entered.
Output: Output the answer to the problem.

Example
Input Output
1 4 1*2+2*3+3*4=20