Diagonal Difference

  • + 1 comment
    result += ((j == k) - (j+k+1 == numInputs)) * curInput;