MathTop

isprime 函数

判断整数是否为素数。

语法

  • isprime(n)

参数与选项

n要测试的整数。

示例

  1. 素数判断isprime(97)返回 true。