Better in Python
Code:b = 1
for c in range(0, 10, 1):
for a in range(0, 10, 1):
for y in range(1, 101,1):
vallhs=eval("("+str(int(str(c)+str(a)))+"*"+str(y)+")"+"-1")
if vallhs==int(str(a)+str(b)+str(c)):
print "1 A="+str(c),"B="+str(b),"C="+str(c),"y="+str(y),"ABC="+str(vallhs)
if vallhs==int(str(a)+str(c)+str(b)):
print "2 A="+str(c),"C="+str(c),"B="+str(b),"y="+str(y),"ACB="+str(vallhs)
if vallhs==int(str(b)+str(a)+str(c)):
print "3 B="+str(b),"A="+str(a),"C="+str(c),"y="+str(y),"BAC="+str(vallhs)
Result:
Code:1 A=1 B=1 C=1 y=24 ABC=311
2 A=1 C=1 B=1 y=24 ACB=311
1 A=1 B=1 C=1 y=48 ABC=911
2 A=1 C=1 B=1 y=48 ACB=911
2 A=2 C=2 B=1 y=14 ACB=321
1 A=5 B=1 C=5 y=11 ABC=615
3 B=1 A=4 C=7 y=2 BAC=147