0
How can I code this problem by using If-else statement only?
Find Summation of the series 1*n+ 2(n-1)+.... n*1, where n will be taken from user. Use If- else condition only. I am unable to code it by if else statement. Here is the following code: https://code.sololearn.com/cA17a19A22a2/?ref=app
3 Answers
+ 3
Alpha Caspian if I got what you mean then this can be calculated with mathematical formulas. In programming code often is useful recursion as here presented:
https://code.sololearn.com/cGZU7IFiVPlp/?ref=app
+ 1
Please clarify your question or move it to your feed.
In its current form it doesn't qualify for Q&A
+ 1
Thank you JaScript