How yo draw a star in qbasic?

1 answer

Answer

1098854

2026-05-18 04:25

+ Follow

In QBASIC, you can draw a star using the LINE and CIRCLE commands to create a star shape. For example, you can use the LINE command to connect points that form the star's points. Here's a simple example:

<code class="language-qbasic">SCREEN 12

LINE (100, 100)-(200, 100), 15 ' Draw horizontal line LINE (150, 50)-(150, 150), 15 ' Draw vertical line LINE (100, 100)-(200, 100), 15 ' Draw diagonal lines to form star points

</code>

Adjust the coordinates to modify the star's size and shape.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.