繁體中文
当前位置:首页 > 信息世界 > 程序源码 > 详细内容
『vb』求3~100之间的素数
发布时间:2009/7/5  阅读次数:2283  字体大小: 【】 【】【
private sub form_click()
dim n as integer,i as integer,k as integer
for n=3 to 100
k=sqr(n)
for i=2 to k
if n mod i =0 then
exit for
end if
next i
if i>k then
print n
end if
next n
end sub
我要评论
  • 匿名发表
  • [添加到收藏夹]
  • 发表评论:(匿名发表无需登录,已登录用户可直接发表。) 登录状态:未登录
最新评论
所有评论[0]
    暂无已审核评论!
 
 版权声明     关于本站      在线留言       登陆管理      个人博客   
 『辰桦网络』. All Rights Reserved
Station construction time: on April 4, 2006