*reformatted.
This commit is contained in:
parent
78b4091834
commit
184ce4621d
@ -7,17 +7,17 @@ begin:
|
||||
dim arr(n)
|
||||
gosub calc
|
||||
gosub show
|
||||
end
|
||||
end
|
||||
|
||||
calc:
|
||||
arr(0) = 1
|
||||
for i = 1 to n - 1
|
||||
if i = 1 then arr(i) = 1 else arr(i) = arr(i - 1) + arr(i - 2)
|
||||
next
|
||||
return
|
||||
return
|
||||
|
||||
show:
|
||||
for i = 0 to n - 1
|
||||
print arr(i), ", "
|
||||
next
|
||||
return
|
||||
return
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
**Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.**
|
||||
|
||||
"Yet Another RPG Dungeon" is a text based game. It's a simple comprehensive example and a tutorial which demonstrates lots of concepts of MY-BASIC.
|
||||
"Yet Another RPG Dungeon" is a text based game. It's a simple comprehensive example and a tutorial which demonstrates lots of aspects of MY-BASIC.
|
||||
|
||||
### Usage
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user