Menu

[solved] – Question 80931

A program that scan a number n and then output the sum of the powers from 1 to n. Thus, if the input is 4, the output should be 288:
1¹ + 2² + 3³ + 4^41 + 4 + 27 + 256 = 288

Solution: for loop, while loop, do while loop

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *