求 2~500间的素数,加急
------解决方案--------------------
- SQL code
declare @i intset @i=2while @i<500begin declare @heshu int set @heshu=0 declare @j int set @j=2 while @j<@i begin if @[email protected]=0 begin set @heshu=1 break end set @[email protected]+1 end if @heshu=0 print @i set @[email protected]+1end