质因数分解

作者在 2017-07-27 16:22:26 发布以下内容
clear
input "请输入一个正整数=" to m
store m to n,n1
x=2
s=1
y=""
do while s<n1
    if mod(n,x)=0
       n=n/x
       s=s*x
       y=y+transform(x)+"*"
    else
        x=x+1
    endif
enddo
messagebox(transform(s)+"="+left(y,len(y)-1))
算法 | 阅读 1112 次
文章评论,共0条
游客请输入验证码
浏览380587次