因数分解 pascal

[复制链接]
查看11 | 回复3 | 2013-4-4 10:50:18 | 显示全部楼层 |阅读模式
var n:longint; procedure zys(x:longint);
//分解因数过程var i,k:longint; begink:=1;while x>1 do begin
i:=0;inc(k);
while x mod k=0 do
begin
inc(i);
x:=x div k;
end;
if i>1 then
//打印因数
if x=1 then write(k,'^',i)
e...
回复

使用道具 举报

千问 | 2013-4-4 10:50:18 | 显示全部楼层
program pyy;varn,i,j:longint;first:boolean;beginreadln(n);first:=true;for i:=2 to trunc(sqrt(n)) do
if n mod i=0
then begin
j:=0;
...
回复

使用道具 举报

千问 | 2013-4-4 10:50:18 | 显示全部楼层
你到底想问什么……...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行