Rectangle Draw

Grady Koch

2929 Duke of York Dr.

Chesapeake, VA 23321

This Model III program randomly picks a point and draws a rectangle there of a certain size. A FOR-NEXT loop allows a number of rectangles to be drawn.

5 'RECTANGLE DRAW BY GRADY KOCH 10 CLS

20 INPUT "INPUT THE NUMBER OF RECTANGLES TO BE DRAWN"; A 30 CLS

40 FOR S-l TO A 50 B«RND(112) 60 C3RND(32) 70 D»=RND( 15 ) 80 SET(B, C) 90 FOR E-B TO B + D : SET(E, C) : NEXT E 100 FOR F-C TO C + D : SET(B + D, F) : NEXT F 110 FOR G«B TO B + D : SET(G, C + D) : NEXT G 120 FOR H-C TO C + D : SET(B, H) : NEXT H 130 NEXT S 140 GOTO 140

Was this article helpful?

0 0

Post a comment