ie总是弹出证书错误:pascal问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 09:51:13
17、打印如下数字阵,要求:
(1) 行数N由键盘输入(N<=9);
(2) 每列数字左边对齐,当N=5时如下:
1
6 2
10 7 3
13 11 8 4
15 14 12 9 5
急!!!!!!!快点啊!!!!!!!!

program Project1;

function inttostr(n:integer):string;
var t:string;
begin
str(n,t);
inttostr:=t;
end;

var s:array[1..9] of string;
n,i,j,c:integer;
t:string;
begin
readln(n);
if n>9 then Writeln('The number must <=9')
else
begin
c:=0;
for i:=1 to n do
for j:=i to n do
begin
c:=c+1;
t:= inttostr(c)+' ';
s[j]:=t+s[j];
end;
for i:=1 to n do
writeln(s[i]);
end;
readln;
end.

program sjz(input,output);
{program by cnpascal.cn}
uses crt;
var x:integer;
procedure print (x:integer);
var i,a,b,c:integer;
begin
writeln;
writeln ('************************');
writeln;
writeln ('1');
for i:=2 to x do begin
if i=2 then b:=1+x else b:=b+x-i+2;
write(b);
c:=b-x+i-1;

write(c:3) ;

for a:=x-i+2 to x-1 do begin
c:=c-a;
if c>9 then
write(c:3)
else
write(c:2);

end;
writeln;
end;
end;{print}

begin
repeat
write ('x=');
readln(x);
until x>=1;
print (x);
readkey
end.