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

vb编写程序 乘法口诀

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

用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 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 Command1_Click() Dim i As Long, j As LongFor i = 1 To 9 For j = 1 To 9 Print j & "*" & i & "=" & i * j, Next j Print Next iPrint "===========================" For i = 1 To 9 For j = 1 To i Print j & "*" & i & "=" & ...

Private Sub Form_Load() Show For i = 1 To 9 For j = i To 1 Step -1 Print i; "*"; j; "="; i * j, Next j Print Next i End Sub

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

这是比较初级的写法。难了偶不会。 不过比较简单。。 Dim s As String Dim a As String Dim i As Integer Dim j As Integer For i = 1 To 9 Step 1 s = "" For j = 1 To i Step 1 a = Str(i) + "*" + Str(j) + "=" + Str(i * j) s = s + a Next ...

对 积 是

思维逻辑要加强 也就是你打印出来的位置 数据 有一个规律 你必须从这些数据中设计出一条公式 在数学中叫通用公式 这通用公式不是唯一的 看你设计的是否合理 如你的例子 3 11 19 27..... 从数学等差公式的规律看 首项为3 公差为8 代入等差公式,...

If Len(Trim(i * j)) = 2 Then ji = i * j & Space(1) Else ji = i * j 这句的意思,是如果积为2位数,则在积的后面添加一个空格,与此同时ji这个变量会自动变为字符串型(因为执行了字符串连接操作),这样的话积的宽度就是3个字符;如果积是1...

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