Answer to Question #265400 in C# for Rudhra

Question #265400

Given three integers j, k and m

Build a function (in any development language) called SeqSummation, that calculates the sequence of summation as per:

j + (j + 1) + (j + 2) + (j + 3) + … + k + (k − 1) + (k − 2) + (k − 3) + … + m

Explanation: increment from j until it equals k, then decrement from k until it equals m. 


1
Expert's answer
2021-11-13T05:43:35-0500

change line

Console.WriteLine("Result: " + SeqSummation(a,b,c));

to next:

Console.WriteLine("Result: " + SeqSummation(j,k,m));

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS