MATLAB: What are all possibilities for a,b,c to be 72

system solve

a = [0:1:20]; b = [0:1:20]; c = [0:1:20];
i want to know what all the possibilities are of the product of a*b*c to be 72
i tried with an if statement but this doesn't work.

Best Answer

a = nchoosek(1:72, 3);
idx = prod(a, 2) == 72;
a(idx, :)