Coding Challenge#3 Solution

Here goes the solution--




Explanation of code--

1.First we import Scanner class and create an object s.
2.Take number of terms to sum up.
3.Initialize sum and the number being added again and again to sum as adder.
4.Then,we apply for loop to sum up the series,the inner loop gives the following terms,
1,2*2,3*3*3,4*4*4*4,.......
5.And the outer loop sums up.
6.And finally we print the sum.

Output:

1.The Program asks for Input n.



2.The Program the required sum.



Thank You for Visiting Our Blog

And,GET READY FOR REGULAR CODING CHALLENGES WHICH WILL BE REALLY AWESOME NOW.


0 Comments