Demo entry 6769854

sas代码

   

Submitted by anonymous on Nov 08, 2018 at 15:13
Language: SAS. Code size: 220 Bytes.

data pnumber;
do i=1 to 10000;
number=0;
do j=1 to i;
if mod(i,j)=0 then number+1;/*判断i是否能被整除*/
end;
if number=2 then output;/*能有两次整除的,即是素数输出*/
end;
drop number j;
attrib i label="素数";
proc print label;
run;

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).