declare
v_count int:=1;
v_sumTotal int:=2;
v_maxCount int;#ç»ä¸ä¸ªå¼æè
ç´æ¥çäº5
v_val1 int:=2;
v_val2 int:=3;
v_val int:=0;
begin
v_maxCount :='&input';//ä¸é¢çäº5è¿éå°±è¦å»æ
while(i<v_maxCount)
Loop
v_sumTotal := v_sumTotal + v_val2/v_val1;
v_val := v_val2;
v_val2 := v_val1 + v_val2;
v_val1 := v_val;
v_count := v_count + 1;
end Loop;
Dbms_Output.Put_Line(v_sumTotal);
end;
温馨提示:内容为网友见解,仅供参考