Last active
July 13, 2018 20:21
-
-
Save cetint/3851953 to your computer and use it in GitHub Desktop.
ABAP-Fibonacci
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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