pascal编程打印下列图形,要快
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/08/15 07:16:17
pascal编程打印下列图形,要快
n=7
1 0 0 0 0 0 1
0 1 0 0 0 1 0
0 0 1 0 1 0 0
0 0 0 1 0 0 0
0 0 1 0 1 0 0
1 0 0 0 0 0 1
n=7
1 0 0 0 0 0 1
0 1 0 0 0 1 0
0 0 1 0 1 0 0
0 0 0 1 0 0 0
0 0 1 0 1 0 0
1 0 0 0 0 0 1
![pascal编程打印下列图形,要快](/uploads/image/z/15241346-26-6.jpg?t=pascal%E7%BC%96%E7%A8%8B%E6%89%93%E5%8D%B0%E4%B8%8B%E5%88%97%E5%9B%BE%E5%BD%A2%2C%E8%A6%81%E5%BF%AB)
var i,j:longint;
begin
for i:=1 to 7 do
begin
for j:=1 to 7 do
begin
if (i=j) or (i+j=8) then write(1) else write(0);
if j
begin
for i:=1 to 7 do
begin
for j:=1 to 7 do
begin
if (i=j) or (i+j=8) then write(1) else write(0);
if j