% solve the 7/11 problem systematically using brute force clear clc counter = 1; for a = 0.01 : 0.01 : 7.08 for b = 0.01 : 0.01 : 7.08 for c = 0.01 : 0.01 : 7.08 for d = 0 : 0.79 : 7.08 mySum = a+b+c+d; myProduct = a*b*c*d; if (mySum == 7.11) if (myProduct == 7.11) return; end end counter = counter + 1; if (rem(counter,10000) == 0) %if (rem(counter,1000000))==0 counter end end end end end counter