用VB语言设计程序,把一个正整数写成若干个素数相乘的形式.
问题描述:
用VB语言设计程序,把一个正整数写成若干个素数相乘的形式.
答
Private Sub Command1_Click()Dim I, J, X, Y, Z As IntegerDim A(1 To 10000) As IntegerDim Flag As BooleanX = Int(InputBox("请输入一个正整数"))Print X & "=";Y = 1: Z = 1For I = 2 To Sqr(X)If X / I = Int(...