package text;
public class TEST{
public static void main(String[] args) {
for (int i = 1; i <=9; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(j+"*"+i+"="+(i*j)+" ");
}System.out.println( );
}
}
}
扩展资料:
用其他的方法输出九九乘法表:
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int i, j ;
for (i = 1; i < 10;i++)
{
for (j = 1; j <= i; j++)
printf("%d*%d = %-3d", i, j, i*j);
printf("\n");
}
system("pause");
return0;
}