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

vb编写程序 乘法口诀

用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

'直角三角形的形式 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...

Private Sub Command1_Click() Dim i As Integer Dim j As Integer For i = 1 To 9 Step 1 Print " "; For j = 1 To 9 Print i * j; Print vbTab; Next j Print vbTab Next i End Sub Private Sub Form_Load() Command1.Caption = "Display(&D)"...

private sub form_click() form1.autoredraw=true form1.cls dim i%,j% for i=1 to 9 for j =1 to 8 print i;“×”;j;“=”;i*j, next print next end sub

(1)print"*" 意思是打印一个字符"*"。 (2)print:print VB中,一行一句命令,如果你想多句命令一行,可用冒号隔开。 print省略参数就表示输出一个空行。 简单说,"print:print"就等于: print print 打印两行空行。 (3)tab(n)函数。 用来将光标移...

对 积 是

这句错了 Picture1.Print Tab((j - 1) * 9 + 1); se 最后少了一个分号,会出现,一行只打印一个。改成: Picture1.Print Tab((j - 1) * 9 + 1); se; 最后加分号,就是不换行意思 ,9个都打印在一行,就可以了。

添加一个模块,模块里写: Sub Main() Dim i As Integer, j As Integer, x As String Form1.Show Form1.Cls Form1.AutoRedraw = True Form1.Caption = "乘法口诀表" For i = 1 To 9 For j = 1 To i x = j & "×" & i & "=" & i * j Form1.Print x...

#include int main() { int i,j; for(i=1;i

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