Question: 4. Write a program to compute the sum of the terms of the series: 4-8+12- 16 20 24 28-32+....n, where n is an input. Consider

4. Write a program to compute the sum of the terms of the series: 4-8+12- 16 20 24 28-32+....n, where n is an input. Consider that n is always valid (which means it follows the series pattern). 1 Enter the value of n: 40 2 e sum iS 1 Enter the value of n: 100 2 3 The sum is 52
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
