代码大全

(singke) #1

a(i) := 1;
a(i+1) := i+1;
i := i+2;
end loop
if (i=Num) then
a(Num):=Num
end if;


a i =i i 1 while
Num


Ada 1.59 0.82 21%
C 1.59 1.15 28%
21 28


Ada :
i:=1
while i Num 1 loop
a i := 1;
a i l := i+1;
a i 2 := i+2;
i:=i+3;
end loop
if i Num then
a Num := Num;
end if
if i Num-1 then
a Num-l := Num-1
end if;

Ada 1.04 0.82 0.72 10%
C 1.59 1.15% 0.99 10%


,
Free download pdf