ywtl.net
当前位置:首页>>关于vb编写程序 乘法口诀的资料>>

vb编写程序 乘法口诀

按钮单击代码 Private Sub Command1_Click() For i = 1 To 9 For j = 1 To i Print i & "*" & j & "=" & i * j & " "; Next j Print Next i End Sub 效果

Private Sub Form_click() For a = 1 To 9 For b = 1 To a Print b; "*"; a; "="; b * a; Next b Print Next a End Sub Private Sub Form_Load() Me.AutoRedraw = True Cls For j = 1 To 9 For k = 1 To 9 If k > j Then Exit For Print k & "*"...

Option ExplicitPrivate Sub Form_Load() Me.AutoRedraw = True Dim i As Long, j As Long, x As Long For i = 1 To 9 For j = 1 To i Me.Print i & " X " & j & " = " & IIf(i * j < 10, " ", "") & i * j & IIf(j = 9, "", " | "); Next If i ...

用VB程序怎么做九九乘法表的步骤如下: 创建显示结果的窗体: 编写按钮宏 Private Sub Command1_Click() Dim a, b As Integer Dim s As String: s = "" For a = 1 To 9 For b = 2 To 9 s = s & a & "*" & b & "=" & b * a If b 9 Then s = s & S...

Private Sub Form_click() For e = 1 To 9 Print Tab(10 * e - 1); e; Next e For i = 1 To 9 Print Tab(1); Print i For j = 1 To i s = i * j k = i & "*" & j & "=" & s Print Tab(10 * j); k; Next j Print Next i End Sub

Private Sub Form_Click() Dim i, j As Integer Dim s As String Print Tab(35); "九九乘法表" For i = 1 To 9 For j = 1 To i s = i & "×" & j & "=" & i * j Print Tab((j - 1) * 9 + 2); s; Next j Print Next i End Sub

主语句: int a[10] //定义一个一维变量,里面10个变量 for(i=0;i

主要程序: Dim i, j As Int16 i = 1 Dim s As String For i = 1 To 9 For j = 1 To i s &= j.ToString & "x" & i.ToString & "=" & i * j & " " Next s &= vbCrLf Next 然后把s变量写入到文件c99.txt就是了。如果你用vb6,那么.toString就不要...

Dim a As Integer Dim b As Integer For a = 1 To 9 For b = 1 To a Print CStr(b) & "*" & CStr(a) & "=" & CStr(a * b); Spc(2); Next b Print Next a

'直角三角形的形式 Dim i As Integer, j As Integer, se As String For i = 1 To 9 For j = 1 To i se = i & "×" & j & "=" & i * j Print Tab((j - 1) * 9 + 1); se; Next j Print Next i '矩形的形式 Dim i As Integer, j As Integer, se As S...

网站首页 | 网站地图
All rights reserved Powered by www.ywtl.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com