WAP to find Prime Numbers from 1 to 100.

Question: Write a program to find prime numbers from 1 to 100.
Answer:
CLS
FOR j = 2 TO 100
FOR k = 2 TO j-1
IF j MOD k = 0 THEN TOTO last
NEXT k
PRINT j;
last;
NEXT j
END

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top