主题:同构数的pascal程序哪错了???
program tonggoushu(input,output);
var
a,b,x,y,z,p:integer;
begin
writeln('please input a(a<=100)');
read(a);
if a>100
then writeln('Please input one smaller number.');
b:=a*a;
x:=0;
y:=0;
z:=0;
p:=0;
if (b div 1000)>0
then
x:=b div 1000;
y:=b div 100 mod 10;
p:=b div 10 mod 100;
z:=b mod 10;
if (b div 1000)=0
then
x:=b div 100;
y:=b div 10 mod 10;
z:=b mod 10;
if a=(y*100+p*10+z) or (p*10+z) or (z)
then writeln('yes')
else writeln('no');
readln;
readln;
end.
本人初学pascal,请各大虾帮帮忙!!!
var
a,b,x,y,z,p:integer;
begin
writeln('please input a(a<=100)');
read(a);
if a>100
then writeln('Please input one smaller number.');
b:=a*a;
x:=0;
y:=0;
z:=0;
p:=0;
if (b div 1000)>0
then
x:=b div 1000;
y:=b div 100 mod 10;
p:=b div 10 mod 100;
z:=b mod 10;
if (b div 1000)=0
then
x:=b div 100;
y:=b div 10 mod 10;
z:=b mod 10;
if a=(y*100+p*10+z) or (p*10+z) or (z)
then writeln('yes')
else writeln('no');
readln;
readln;
end.
本人初学pascal,请各大虾帮帮忙!!!