下面VB程序的功能是判断一个整数是否为素数。在文本框Text1中输入一个整数x,如果x是素数,则在标签Label1中显示“Y”,否则显示“N”。程序中有两处错误,请改正。
Private Sub Command1_Click( )
Dim i As Integer,x As Integer,pd As Boolean
Val(Text1.Text)=x
pd=True
i=1
Do While i<x And pd=True
If x Mod i=0 Then
pd=False
Else
i=i+1
End If
Loop
If pd=True Then
Label1.Caption=“Y”
Else
Label1.Caption=“N”
End If
End Sub
错误语句1:________改为:________;
错误语句2:________改为:________。