for num1=100:999
for num2=100:999
num3=num1-num2;
if(num3999),continue;end
temp=strcat(num2str(num1),num2str(num2),num2str(num3));
flag=1;
for cnt1=1:length(temp)-1
for cnt2=cnt1+1:length(temp)
if(any(temp=='0',2)),flag=0;break,end
if(temp(cnt1)==temp(cnt2)),flag=0;break,end
end
if(flag==0),break,end
end
if(flag==1),fprintf('%d-%d=%dn',num1,num2,num3);end
end
end