37.  DO的一个例子

BACKWARDFORWARD


  • 初始化
    • a = [0,1,2,3,4]
      b = [5,6,7,8,9]
      c = [10,20,30,40,50]

    DO i = 2,4
       a(i) = a(i-1) + a(i+1)
       c(i) = b(i) * a(i+1)
    END DO

  • 然后得:
    • a = [0,10,60,40,4]
      b = [5,6,7,8,9]
      c = [10,60,420,320,50]


Copyright: NPACT BACKWARDFORWARD