I am trying to create a program where i would be able to calculate center of mass in 2-D. Everything has been working out fine with the code except it is giving me the wrong answers and placing the same thing in both the x and y outputs i have set. My obvious guess was that there was a math problem but i honestly do not know how to go about fixing this. Can someone please tell me how to fix this problem?