代码大全

(singke) #1

Socrates
PDL PDL Glaucon
Callicles
Ismene


Socrates Ismene


19.4


{write out sums 1..n for all n form 1 to Num}
Crnt := 1


Prev := 0


Sum := 1


for i := 1 to Num do


begin
writeln Sum


Sum := Crnt + Prev


Prev := Crnt


Crnt := Sum


end

Num


set Product to "Base"


Product := Base;


loop from 2 to "Num"


fot i := 2 to Num do


begin


{ Multiply "Base" by "Product" }


Product := Product * Base;


end;


?
Base Num

Free download pdf