java打印九九乘法表
打印九九乘法表代码如下
public static void main(String[] args) {
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(i+"*"+j+"="+j*i+" ");
}
System.out.print("\n");
}
}
我们vb程序老师让我们编程九九乘法表,要求在窗体上输出表。求程序啊
'点击窗体出现九九乘法表,如果显示不全,适当调大窗体Private Sub Form_Click() Dim a As Integer Dim b As Integer Dim c As String For a = 1 To 9 c = "" For b = 1 To 9 c = c & a & "×" & b & "=" & a * b & vbTab Next b Print c Next aEnd Sub