Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Time-a-function/Batch-File/time-a-function.bat
Normal file
22
Task/Time-a-function/Batch-File/time-a-function.bat
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
@echo off
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
call :clock
|
||||
|
||||
::timed function:fibonacci series.....................................
|
||||
set /a a=0 ,b=1,c=1
|
||||
:loop
|
||||
if %c% lss 2000000000 echo %c% & set /a c=a+b,a=b, b=c & goto loop
|
||||
::....................................................................
|
||||
|
||||
call :clock
|
||||
|
||||
echo Function executed in %timed% hundredths of second
|
||||
goto:eof
|
||||
|
||||
:clock
|
||||
if not defined timed set timed=0
|
||||
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
|
||||
set /A timed = "(((1%%a - 100) * 60 + (1%%b - 100)) * 60 + (1%%c - 100)) * 100 + (1%%d - 100)- %timed%"
|
||||
)
|
||||
goto:eof
|
||||
Loading…
Add table
Add a link
Reference in a new issue