·您的位置: 首页 » 资源教程 » 编程开发 » ASP » 分解质因数(asp 分布递归法)

分解质因数(asp 分布递归法)

类别: ASP教程  评论数:0 总得分:0
***start input.asp***
<% thenum= request("num") %>
<style type="text/css">
<!--
.trees {  border-color: black black black #666666; padding-left: 12px; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 3px; margin-top: 2px; margin-bottom: 2px}
-->
</style>

<div class = "trees" id="tree<%=thenum%>"><%=thenum%><span id="follow<%=thenum%>"><iframe name = "agent<%=thenum%>" style="display:none" src="prime_number.asp?num=<%=thenum%>"></iframe></span></div>
***end input.asp***

***start prime_number.asp***
<%
IsPrimeNumber = false
thenum = request("num")
if thenum = 2 or thenum = 1 then
    IsPrimeNumber = false
else
    for i = 2 to thenum -1
        if thenum / i = int(thenum / i) then IsPrimeNumber = true: m = i : exit for
    next
end if
if IsPrimeNumber = false then %>

    <script>
    var htmltext = '<div class = "trees"><%=thenum%>*</div>';
    parent.follow<%=thenum%>.innerHTML = htmltext;
    </script>

<%else%>
        <%k = thenum / m%>
        <script>
        var htmltext = '<div class = "trees"><%=m%>*</div><div class = "trees" id="tree<%=k%>"><%=k%><span id="follow<%=k%>"><iframe name = "agent<%=k%>" style="display:none" src="prime_number.asp?num=<%=k%>"></iframe></span></div>';
        parent.follow<%=thenum%>.innerHTML = htmltext;
        </script>

<%end if%>
***end prime_number.asp***

算法应用:分布多线程树读取

-= 资 源 教 程 =-
文 章 搜 索
关键词:
类型:
范围:
纯粹空间 softpure.com
Copyright © 2006-2008 暖阳制作 版权所有
QQ: 15242663 (拒绝闲聊)  Email: faisun@sina.com
 纯粹空间 - 韩国酷站|酷站欣赏|教程大全|资源下载|免费博客|美女壁纸|设计素材|技术论坛   Valid XHTML 1.0 Transitional
百度搜索 谷歌搜索 Alexa搜索 | 粤ICP备19116064号-1