Factoring Intergers脚本没有给出正确的结果 [英] Factoring Intergers script does not give correct results

查看:68
本文介绍了Factoring Intergers脚本没有给出正确的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以这个小脚本应该列出整数的因素。

展开 | 选择 | Wrap | 行号

解决方案

Heya,Taorluath。欢迎来到TSDN!


更改主题标题以更好地描述问题(您是否知道标题包含三个或更少单词的主题实际上得到了FEWER响应?)。


如果我不得不猜测,我会说这一行是问题所在:

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


如果我正确地猜测你的意图,你真的还没有完全说出这个问题。你想要这个独特的素数分解,对吧?这是一堂课吗?如果是这样,它会帮助你知道你碰巧在什么程度上解决这个问题。


BTW:完全失败对错误的描述不是很好。 :)


我同意pbmods。这看起来像是问题。


如果这是一个类(即使它不是),你应该真正处理代码的布局以提高可读性。骆驼套管(即


ok, so this little script is supposed to list the factors of intergers.

Expand|Select|Wrap|Line Numbers

解决方案

Heya, Taorluath. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles contain three words or less actually get FEWER responses?).

If I had to guess, I''d say that this line is the problem:

Expand|Select|Wrap|Line Numbers


You really haven''t fully stated the problem, either, if I''m guessing your intention correctly. You want the unique prime factorization of this, right? Is this for a class? If so, it''d help to know at what level you happen to be as there are a few ways of solving this problem.

BTW: "Totally fail" is not a good description of what goes wrong. :)


I agree with pbmods. That looks like the problem.

If this is for a class (and even if it isn''t) you should really work on the layout of your code for readability. Camel casing (i.e.


这篇关于Factoring Intergers脚本没有给出正确的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆