主题:请问哪错了?
'1、打印1000以内的亲密素数。相差为2的两个数,如果它们都是素数(myPri(x)),则称为亲密素数。
DECLARE FUNCTION MYPRI(BYVAL X AS INTEGER) AS INTEGER
DIM AS INTEGER I
FOR I=3 TO 1000
IF MYPRI(I)=I AND MYPRI(I+2)=I+2 THEN ? I;
NEXT I
FUNCTION MYPRI(BYVAL X AS INTEGER) AS INTEGER
DIM AS INTEGER F,T,J
F=0
FOR J=2 TO 1000
IF X MOD J=0 THEN F=1
IF F=1 THEN MYPRI=X
NEXT J
END FUNCTION
DECLARE FUNCTION MYPRI(BYVAL X AS INTEGER) AS INTEGER
DIM AS INTEGER I
FOR I=3 TO 1000
IF MYPRI(I)=I AND MYPRI(I+2)=I+2 THEN ? I;
NEXT I
FUNCTION MYPRI(BYVAL X AS INTEGER) AS INTEGER
DIM AS INTEGER F,T,J
F=0
FOR J=2 TO 1000
IF X MOD J=0 THEN F=1
IF F=1 THEN MYPRI=X
NEXT J
END FUNCTION