Write a qbasic program to display prime numbers from 100 to 200.

Write a qbasic program to display prime numbers from 100 to 200.

Ans:

CLS
FOR n=100 TO 200
C=0
FOR j=1 TO n
       IF n MOD j=0 THEN c=c+1 
NEXT j
IF c=2 THEN PRINT n
NEXT n
END