MathWorks Interview Question

Matlab: weight sum. find numbers above a threshold... C++: GCD.