Skip to content

Instantly share code, notes, and snippets.

@cetint
Last active July 13, 2018 20:21
Show Gist options
  • Save cetint/3851953 to your computer and use it in GitHub Desktop.
Save cetint/3851953 to your computer and use it in GitHub Desktop.
ABAP-Fibonacci
REPORT zfibonacci_10.
DATA : lv_old TYPE i VALUE 1 ,
lv_current TYPE i VALUE 2 ,
lv_next TYPE i .
WRITE 'Fibonacci dizisinin ilk 10 elemanı : ' .
WRITE : lv_old, lv_current .
DO 8 TIMES .
lv_next = lv_old + lv_current . "3 = 1 + 2
WRITE lv_next . "3
lv_old = lv_current . "lv_old = 2
lv_current = lv_next . "lv_current = 3
ENDDO .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment