9^n+2是不是质数vb编程如下Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim c As Singlea = 1b = 2Do Until c - intc = 0Do Until c - intc = 0 Or 9 ^ a - 3

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 02:21:40
9^n+2是不是质数vb编程如下Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim c As Singlea = 1b = 2Do Until c - intc = 0Do Until c - intc = 0 Or 9 ^ a - 3
x)6z6c@ŖϦn(KzgO5=PYX\b钙XWZ'A̼D[$ a䒯WU+I `T/RTZ`lT` Tw9p$lH~=f}QeP_`g3$#T<[C#={A"O? 18cm#[scC[Cs- `=lV8?m6B z.6zs>Bn';v-|VˋsA v=h `r@?nhBrJ

9^n+2是不是质数vb编程如下Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim c As Singlea = 1b = 2Do Until c - intc = 0Do Until c - intc = 0 Or 9 ^ a - 3
9^n+2是不是质数
vb编程如下
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Single
a = 1
b = 2
Do Until c - intc = 0
Do Until c - intc = 0 Or 9 ^ a - 3

9^n+2是不是质数vb编程如下Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim c As Singlea = 1b = 2Do Until c - intc = 0Do Until c - intc = 0 Or 9 ^ a - 3
不是,n=0,1,2,4..都是,但n=3时不是
当n=3时,9^3+2=731=17*43

如果是9^N+2就不是,如果是(9^N)+2也不是,因为N为负数的话,就为分数,分数不是质数。