本文作者:qiaoqingyi

vb九九乘法表编程(九九乘法表vb编程代码)

qiaoqingyi 2023-11-11 118

Dim i As Integer,j As Integer For i = 1 To 9 For j = 1 To i Print j quotX quot i quot= quot i * j v。

Private Sub Form_clickDim i As Integer, j As Integer For i = 1 To 9 For j = i To 9 Print i quot*quot j quot=quot i * j quot quotNext j Print Next i End Sub for嵌套循环,如有问题,请追问;#39点击窗体出现九九乘法表,如果显示不全,适当调大窗体PrivateSubForm_ClickDimaAsIntegerDimbAsIntegerDimcAsStringFora=1To9c=\quot\quotForb=1To9c=ca\quot×\quotb\quot=\quota*bvbTabNextbPrintcNextaEndSub;Dim i As Integer, j As Integer, s As IntegerPrivate Sub Command1_ClickPrint Tab35 quot九九乘法表quot For i = 1 To 9 For j = 1 To 9 Print Tabj 1 * 9 i quot×quot j;输出时你每次都得重新设置输出坐标,例如 Picture1CurrentX = 100 #39水平坐标 Picture1CurrentY = 50 #39垂直坐标 Picture1Print quot字符串quot或者变量 #39输出文字 字体大小和颜色这个应该没法单独设置某些字 所以在事件开始;sub cfb dim i , n as integer for i=1 to 9 for n=1 to i text1text=text1text i quotXquot n quot=quot i*n quot quot #39最后空几格好些 next n text1text=text1text chr13 #39;Tabn表示一行开头算起,第N个字符开始输出例如Tab2表示从一行开头算起,第2个字符开始输出这句 Print Tabj * 9 + 1 i quot*quot j quot=quot i * j是的意思如下j=1时,1*9+1;Private Sub Command1_ClickMeFontSize = 30#39字体大小 30有点大,超出窗口范围了 Dim i As Integer Dim j As Integer Dim s As String For i = 1 To 9 For j = 1 To i s = CStri quot*quot CStr。

部分代码请新建一个工程,然后在窗体代码中,加入以下代码,运行后,点击窗口,就会出现运行结果Private Sub Form_ClickAutoRedraw = True #39让窗口自动重绘,以免挡住了就看不见了 Cls #39清除窗体的内容 Width =;没图啊,大概这样 Dim i As Integer Dim j As Integer For i = 1 To 9 Step 1 Print quot quotFor j = 1 To 9 Print i quot*quot j quot=quot i * j Print vbTabNext j Print vbCrLf Next i;用VB程序怎么做九九乘法表的步骤如下创建显示结果的窗体编写按钮宏 Private Sub Command1_ClickDim a, b As Integer Dim s As String s = quotquotFor a = 1 To 9 For b = 2 To 9 s = s a quot*quot;dim i as integer, j as integer, c as string c=quotquotfor i=1 to 9 for j=i to i c=c i*j next c=c vbcrlf next text1text=c;vb中输出九九乘法表,可以参考下面的代码Private Sub Form_ClickFor a = 1 To 9 For b = 1 To a Print b quot*quot a quot=quot b * aNext b Print Next a End Sub。

主语句int a10定义一个一维变量,里面10个变量 fori=0ilt=9i++forj=0jlt=9j++制造两个循环 int sumsum=i*j 再用SUM去存I*J结果;Public Class Form1 Private Sub Button1_Clicksender As Object,e As EventArgsHandles Button1Click Dim i,j As Integer Dim se As String Label1Text=quotquotFor i=1 To 9 Step 1 For j=1 To 9 Step 1 se。

vb九九乘法表编程(九九乘法表vb编程代码)

阅读
分享