用VB實現答應三角九九乘法表

2023-01-05 01:05:58 字數 876 閱讀 3139

1樓:匿名使用者

上三角九九乘法表:

private sub form_click()dim i as integer, j as integerfor i = 1 to 9

for j = 1 to 9

if i >= j then

se = i & "x" & j & "=" & i * jprint tab((j - 1) * 9 + 1); se;

end if

next j

print

next i

end sub

下三角九九乘法表:

private sub form_click()dim i as integer, j as integerfor i = 1 to 9

for j = 1 to 9

if i <= j then

se = i & "x" & j & "=" & i * jprint tab((j - 1) * 9 + 1); se;

end if

next j

print

next i

end sub

2樓:

private sub command1_click()dim i, j as integer

for i = 1 to 9

for j = 1 to i

label1.caption = label1.caption & i & " * " & j & " = " & i * j & " "

next j

label1.caption = label1.caption & vbcrlf

next i

end sub

用Python怎樣實現九九乘法表

哈哈 看見你這個我就想起了 開啟鉛筆盒偷偷看。然後 隨便寫一寫 from prettytable import prettytable pt prettytable pt.field names i for i in range 1,10 mulp x format a a,b b,c a b if...

怎麼用vb編出九九乘法表如下圖,用VB程式怎麼做九九乘法表?

private sub form load me.autoredraw true dim i,j as integer dim sdisp as string for i 1 to 9 for j 1 to 9 if i j then sdisp sdisp j x i i j iif i j 9,...

c語言程式設計九九乘法表輸出等邊三角形

include int c int x,int y 函式宣告 define n 13 主函式 int main for i 0 i n i 控制輸出n行return 0 計算楊輝三角 int c int x,int y include void main printf n 輸出結果為 1 1 1 2...