*reformatted.
This commit is contained in:
parent
78b4091834
commit
184ce4621d
@ -7,17 +7,17 @@ begin:
|
|||||||
dim arr(n)
|
dim arr(n)
|
||||||
gosub calc
|
gosub calc
|
||||||
gosub show
|
gosub show
|
||||||
end
|
end
|
||||||
|
|
||||||
calc:
|
calc:
|
||||||
arr(0) = 1
|
arr(0) = 1
|
||||||
for i = 1 to n - 1
|
for i = 1 to n - 1
|
||||||
if i = 1 then arr(i) = 1 else arr(i) = arr(i - 1) + arr(i - 2)
|
if i = 1 then arr(i) = 1 else arr(i) = arr(i - 1) + arr(i - 2)
|
||||||
next
|
next
|
||||||
return
|
return
|
||||||
|
|
||||||
show:
|
show:
|
||||||
for i = 0 to n - 1
|
for i = 0 to n - 1
|
||||||
print arr(i), ", "
|
print arr(i), ", "
|
||||||
next
|
next
|
||||||
return
|
return
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
**Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.**
|
**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
|
### Usage
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user