问题:abcd*4=dcba 求出abcd各为多少?
vb代码设计:
private Sub form_load()
show
Dim a = as long
Dim b = as long
Dim c = as long
Dim d = as long
for a = 1 to 9
next a
for b = 1 to 9
next b
for c = 1 to 9
next c
for d = 1 to 9
next d
if(1000*a+100*b+10*c+d)*4=(1000*d+100*c+10*b+a) then
print a,b,c,d
end if
end sub