大家帮忙,C#中的这行代码,在VB里面,怎么转换
1个回答
展开全部
Private Function f(ByVal inputStr As String) As Boolean
Dim y As Boolean = False
If inputStr = StrReverse(inputStr) Then
y = True
End If
Return y
End Function
Private Sub Command1_Click()
Dim i As Integer
Print "加上2013为对称自然数的所有自然数:"
For i = 1 To 999
If f(i + 2013) Then
Print i
End If
Next
End Sub
Private Sub Command2_Click()
Dim i As Integer
Print "加上2013为对称自然数的所有对称自然数:"
For i = 1 To 999
If f(i) And f(i + 2013) Then
Print i
End If
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询