Sum of the first nth term of Series
Task:
Your task is to write a function which returns the sum of following series upto nth term(parameter).
Rules:
You need to round the answer to 2 decimal places and return it as String.
If the given value is 0 then it should return 0.00
You will only be given Natural Numbers as arguments.
Examples:
NOTE: In PHP the function is called series_sum()
.
Solutions
🧠 C++
Last updated
Was this helpful?