pascal数字金字塔 急死了!Description 输入正整数n,输出n层数字金字塔.Input 只有一行且只有一个正整数:n (1

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 04:52:26
pascal数字金字塔 急死了!Description 输入正整数n,输出n层数字金字塔.Input 只有一行且只有一个正整数:n (1

pascal数字金字塔 急死了!Description 输入正整数n,输出n层数字金字塔.Input 只有一行且只有一个正整数:n (1
pascal数字金字塔 急死了!
Description
输入正整数n,输出n层数字金字塔.
Input
只有一行且只有一个正整数:n
(1

pascal数字金字塔 急死了!Description 输入正整数n,输出n层数字金字塔.Input 只有一行且只有一个正整数:n (1
var
n,ck,i,j:integer;
begin
read(n);ck:=40;
for i:=1 to n do
begin
write(1:ck);
dec(ck);
for j:=2 to i do
write(j);
for j:=i-1 downto 1 do
write(j);
writeln;
end;
end.
选我吧