awtk/tests/fscripts/demo_while4.fs

14 lines
106 B
Forth
Raw Normal View History

2022-08-23 11:21:48 +08:00
var a=0
var b=0
2021-01-02 23:07:37 +08:00
while(a < 100) {
a=a+1
b=b+a
if(a > 20) {
break;
}
print(a, b)
}
print(b)