L
lafaer
Unregistered / Unconfirmed
GUEST, unregistred user!
程序如下:/请帮忙
program Project2;
uses
SysUtils;
Type stu=^st;
st=record
data:integer;
next:stu;
end;
var
head:stu;
procedure Create();
var
p:stu;
c:integer;
begin
head:=nil;
read(c);
while c<>100do
begin
new(p);
p^.data:=c;
p^.next:=head;
head:=p;
readln(c);
end;
end;
procedure outlink(p:stu);
var
q:stu;
begin
q:=p;
while q<>nildo
begin
writeln(q^.data);
q:=q^.next;
end;
end;
begin
create();
outlink(head);
readln;
end.
program Project2;
uses
SysUtils;
Type stu=^st;
st=record
data:integer;
next:stu;
end;
var
head:stu;
procedure Create();
var
p:stu;
c:integer;
begin
head:=nil;
read(c);
while c<>100do
begin
new(p);
p^.data:=c;
p^.next:=head;
head:=p;
readln(c);
end;
end;
procedure outlink(p:stu);
var
q:stu;
begin
q:=p;
while q<>nildo
begin
writeln(q^.data);
q:=q^.next;
end;
end;
begin
create();
outlink(head);
readln;
end.