Write a program to print 3,6,12,24.....n using for loop
Answers
Answered by
1
Sum of the series (1*2) + (2*3) + (3*4) + …… upto n terms
Given a value n, the task is to find sum of the series (1*2) + (2*3) + (3*4) + ……+ n terms
Examples:
Input: n = 2 Output: 8 Explanation: (1*2) + (2*3) = 2 + 6 = 8 Input: n = 3 Output: 20 Explanation: (1*2) + (2*3) + (2*4) = 2 + 6 + 12 = 20
Similar questions