In GW-BASIC, you can print even numbers from 1 to 100 using a simple loop. Here’s a sample code:
FOR i = 1 TO 100
IF i MOD 2 = 0 THEN PRINT i
NEXT i
This program iterates through numbers 1 to 100 and prints each number if it is even (i.e., divisible by 2).