How to make 1 to 10 squares in qbasic?

1 answer

Answer

1220675

2026-07-25 03:00

+ Follow

In QBASIC, you can create squares from 1 to 10 by using a loop and the LINE statement. Here's a simple example:

<code class="language-qbasic">FOR i = 1 TO 10

LINE (10, 10 * i)-(10 + i * 10, 10 * i + i * 10), , B NEXT i

</code>

This code will draw squares of increasing size, starting from 1x1 to 10x10, with their bottom-left corners positioned vertically. Adjust the coordinates in the LINE statement to position the squares as needed.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.