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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!