title: Q: How can I turn this Fibonacci sequence into an array in batch programming?
body: <p>the script successfully calculates the fibonacci sequence but I am not sure how to turn the numbers into an array.</p>
  
  <p>`Title Fibonacci array
      @echo off
      setlocal enableDelayedExpansion</p>
  
  <pre><code>:Fibonacci
  setlocal
      ::C=current L=last S=Swap
      set C=1
      set L=0
  
      for /l %%G in (1,1,30) do (
          set S=!C!
          set /a C+=!L! &amp; Call :Array !C!
          set L=!S!
  )
  
  :Array
      ::Here is where you create the array
      set i=-1
  
      for %%X in (%1 %2 %3 %4 %5 %6 %7 %8 %9) Do (
          set /a i+=1
          set /a Fib[!i!]=%%X
  )   
      set index=!i!
  
      for /l %%X in (0,1,!index!) do (
          echo !Fib[%%X]!
  
  )
  pause&gt;nul
  endlocal`
  </code></pre>