Skip to content

Commit

Permalink
added Fibonacci example code
Browse files Browse the repository at this point in the history
  • Loading branch information
jdszekeres committed Sep 12, 2020
1 parent 9859102 commit cc2b71a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions fib.ezl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
PRINT "How many fibonacci numbers do you want?"
INPUT nums
PRINT ""
LET a = 0
LET b = 1

WHILE nums > 0 REPEAT
IF a % 2 == 0.0 THEN
PRINT "even"
ENDIF
IF a % 2 != 0.0 THEN
PRINT "Odd"
ENDIF
PRINT a
LET c = a + b
LET a = b
LET b = c
LET nums = nums - 1
ENDWHILE

0 comments on commit cc2b71a

Please sign in to comment.