1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 17:01:21 +00:00
QB64-PE/tests/qbasic_testcases/misc/frac1.bas
Matthew Kilgore 9ee89d6ff4 Add QBasic tests
These tests use a variety of sample code (with some of the larger files
removed, so they are not complete!) and verifies that they all compile
successfully.
2022-04-28 23:00:07 -04:00

18 lines
320 B
QBasic

DIM XX(1 TO 3) AS DOUBLE, YY(1 TO 3) AS DOUBLE, X AS DOUBLE, Y AS DOUBLE
DIM I AS INTEGER
SCREEN 12
WINDOW (0, 0)-(1.6, 1.2)
XX(1) = 0
YY(1) = 0
XX(2) = 2.4 / SQR(3)
YY(2) = 0
XX(3) = 1.2 / SQR(3)
YY(3) = 1.2
DO
I = INT(RND(1) * 3) + 1
X = .5 * (X + XX(I))
Y = .5 * (Y + YY(I))
PSET (X, Y)
LOOP UNTIL INKEY$ = CHR$(27)