您还可以编写代码,用一个正整数的因子来确定它是否为素数(定义为大于1的整数,该数字仅有的因子为1和本身)。
You could also write code that USES a positive integer's factors to determine if it is a prime number (defined as an integer greater than 1 whose only factors are 1 and the number itself).
我们将编写一个确定整数因子的类。
We will write a class that determines the factors of an integer.
其中一个构造函数以双精度浮点数作为输入,另一个以整数和换算因子作为输入,还有一个以小数的String表示作为输入。
One takes a double-precision floating point as input, another takes an integer and a scale factor, and another takes a String representation of a decimal number.
这些离散的值乘以整数,乘积因子,是普朗克常数除以2π,其中n可以取1,2,3,等等。
n It takes discrete values, multiples of some integer n, and the multiplication factor is the ratio of the Planck constant divided by 2 pi where n takes one, two, three and so on.
我的第一个(错误)假定导致我使用一列整数作为因子,但是这是个糟糕的抽象。
My first (incorrect) assumption led me to use a list of integers for my factors, but that's a poor abstraction.
最大公约数,也称最大公因数、最大公因子,指两个或多个整数共有约数中最大的一个。
The greatest common divisor, also known as the greatest common factor, the most common factor, refers to two or more integers have one of the biggest in a few.
最大公约数,也称最大公因数、最大公因子,指两个或多个整数共有约数中最大的一个。
The greatest common divisor, also known as the greatest common factor, the most common factor, refers to two or more integers have one of the biggest in a few.
应用推荐