Obsolete!!! Fucking old examples...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

25 lines
742 B

@echo off
rem ****************************
rem Ñöåíàðèé: fibo_proc.bat
rem Äàòà ñîçäàíèÿ 7/10/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/15/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: ðåêóðñèâíàÿ ïðîöåäóðà
rem äëÿ âû÷èñëåíèÿ ÷èñåë Ôèáîíà÷è.
rem Íå âûçûâàéòå íåïîñðåäñòâåííî,
rem èñïîëüçóéòå ñêðèïò fibo
rem Arg1 - íîìåð ÷èñëà Ôèáîíà÷è
rem Arg2, Arg3 - ïîñëåäîâàòåëüíî èäóùèå 2 ÷èñëà Ôèáîíà÷è
rem ****************************
rem Ôàéëû: ìîæåò ðàáîòàòü âàùå áåç âèíòà
rem ****************************
if %Arg1%==1 goto :EOF
if %Arg1%==2 goto :EOF
set /a Arg1=%Arg1%-1
set /a tmp=%Arg3%
set /a Arg3=%Arg2%+%Arg3%
set /a Arg2=%tmp%
call fibo_proc Arg1 Arg2 Arg3