全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
922 0
2020-01-08
%macro zhishu(low,high);
    data c;
        do i=&low to &high;
           k=0;
           do j=1 to i;
           if mod(i,j)=0 then k+1;
           if k>3 then leave;
           end;
           if k=2 then output;                                  
         end;
         keep i;
         run;
     proc print data=c;
         run;
%mend;

%zhishu(10,500)


%macro zhishu2(low,high);
    %do i=&low %to &high;
           %let k=0;
           %do j=1 %to &i;
           %if %SYSFUNC(mod(&i,&j))=0 %then %let k=%eval(&k+1);
           %if &k>3 %then %goto enddo;
                %end;
                %enddo:;
            %if &k=2 %then %put &i;
         %end;
%mend;

%zhishu2(100,200)


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群