KyleDeng

 申明变量 

 Dim a AS Integer/double/Single

 

循环语句

For J=1 To 100 Step 1

Next J

 

选择语句

 

If 条件  Then

语句组1

else

……

End If

 

and 与
or 或
xor 抑或
not 非

&符号是作字符串连接用的,比如"abc" & "123"的结果为"abc123" 

 

vb上的递归

Public Function fuck_xiang(a As Integer) As Integer


If a = 1 Or a = 2 Then

fuck_xiang = 1


Else: fuck_xiang = fuck_xiang(a - 1) + fuck_xiang(a - 2)

End If



End Function


Private Sub Command1_Click()

Dim i As Integer


For i = 1 To 10 Step 1

Print fuck_xiang(i)

Next i



End Sub

 

分类:

技术点:

相关文章:

  • 2021-06-23
  • 2021-08-09
  • 2021-11-17
  • 2021-06-27
  • 2022-01-25
  • 2021-12-22
  • 2021-09-23
  • 2022-01-02
猜你喜欢
  • 2021-11-17
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-11-17
  • 2021-06-30
  • 2021-07-14
相关资源
相似解决方案