PROGRAM abc;
VAR
a:ARRAY[1..5]OF real;
temp:real;
i,j:integer;
PROCEDURE pl(temp:real;i,j:integer;a:ARRAY[i:interger]OF real);{系统检查到这行的【时提示:error 54:of expected 是什么问题?}另:我想知道在定义新过程时,参数表里数组怎么表示
BEGIN
FOR i:=1 TO 5 DO
read(a[i]);
FOR i:=1 TO 4 DO
FOR j:=1 TO 5-i DO
IF a[j]<a[j+1]
THEN BEGIN
temp:=a[j];
a[j]:=a[j+1];
a[j+1]:=temp
END;
FOR i:=1 TO 5 DO
write(a[i]);
readln
END;
BEGIN
pl;
END.
定义数组
var names:array[1..Maxlongint]of integer;names改为你想要的变量名
.Maxlongint改为范围
integer改为你要的类型
for i:=1 to Maxlongint do
names[i]:=0;
初始化