Talking about programming languages, I have a question:
About Message 3586669 or go2net.com why the program listed below gives the answers given underneath?
var t,w,o,h,r,e:byte; f:text;
begin assign(f,'out.');rewrite(f); for t:=0 to 9 do for w:=0 to 9 do for o:=0 to 9 do for h:=0 to 9 do for r:=0 to 9 do for e:=0 to 9 do if (10000*(t*t-t)+1000*(2*t*w-h)+100*(2*t*o+w*w-r)+10*(2*w*o-e)+o*o-e=0) then if (t<>w) and (t<>o) and (t<>h) and (t<>r) and (t<>e) and (w<>o) and (w<>h) and (w<>r) and (w<>e) and (o<>h) and (o<>r) and (o<>e) and (h<>r) and (h<>e) and (r<>e) then writeln(f,t,w,o,' * ',t,w,o,' = ',t,h,r,e,e); close(f); end.
062 * 062 = 03844 138 * 138 = 19044 562 * 562 = 53700 |