16
Answers

C# summation equation help

David Smith

David Smith

12y
2.8k
1
Hi guys, I am trying to produce or develop this equation below using an effective way.


I have two arrays or two dictionaries that i need to get the summation of.  R
Review below and also the print screen in the below attachment.

How to write the below equation in code. The below equation should give a single value



 output = (Summation ( Array1 *  Array2)) / (Summation (Array1)


Keep in mind:

Array1 contains values below
Array1[0] = 1.0;
Array1[1] = 2.0;
Array1[2] = 3.0;
Array1[3] = 4.0;
Array1[4] = 5.0;


Array2 contains values below
Array2 [0] = 2.0;
Array2 [1] = 3.0;
Array2 [2] = 4.0;
Array2 [3] = 5.0;
Array2 [4] = 5.0;





Attachment: summationequation.zip

Answers (16)