1有点看不清
如果是#后不带空格,那么是
var
i,j:integer;
begin
for i:=6 downto 1 do
begin
for j:=1 to 6-i do
write(' ');
for j:=1 to i*2-1 do
write('#');
writeln
end;
readln;
end.
如果带空格的话就是
var
i,j:integer;
begin
for i:=6 downto 1 do
begin
for j:=1 to 12-2*i do
write(' ');
for j:=1 to i*2-1 do
write('# ');
writeln
end;
readln;
end.
2 LZ写的不是太清楚,应该是3次方把
var
a,b,c:integer;
begin
for a:=1 to 9 do
for b:=0 to 9 do
for c:=0 to 9 do
if a*100+b*10+c=a*a*a+b*b*b+c*c*c then writeln(a,b,c);
readln;
end.
2program:cscs;(名字你自己编好了)
var i,a,b,c:integer;
Begin
for i:=100 to 999
begin
a=i div 10
b=i div 10 mod 10
c=i div 100
if(i=a*a*a+b*b*b+c*c*c)then write (i);
end;
End.
我只想出了第二题