Tuesday, October 1, 2019

Prime or composite using sub

DECLARE SUB CHECK()
CLS
INPUT"ENTER ANY NO";N
CALL CHECK(N)
END

SUB CHECK(N)
C=0
FOR I=1 TO N
IF N MOD I=0 THEN C=C+1
NEXT I
IF C=2 THEN
PRINT"PRIME NO"
ELSE
PRINT"COMPOSITE NO"
END IF
END SUB

No comments:

Post a Comment

Experience of covid-19 and cancelling SEE exam

A dangers virus called corona also know as COVID-19 took place around the world. This virus was first found in Wuhan china.this virus start...