Topic: Mathematics Problem / Level: advanced

Problem: Write a program to calculate the sum of all distinct elements in an array.

Run the code to see the output here...