Dim N%, N1%, N2%, I%, K1%, K2% N=Val(InputBox("输入大于6的偶数")) For N1 = 3 To N \ 2 Step 2 K1 = Int(Sqr(N1)) For I = 2 To K1 '判断N1是否是素数 If N1 Mod I = 0 Then Exit For Next I If I > K1 Then '如果N1为素数,将N分解为N1+N2 N2 = N - N1 K2 = Int(Sqr(N2)) For I = 2 To K2 '判断N2是否是素数 If N2 Mod I = 0 Then Exit For Next I If I > K2 Then ' 如果N2也为素数,则打印输出 Print N & "=" & N1 & "+" & N2 End If End If Next N1