1.打印出九九乘法表
(1)用while循环
int a = 1;
while(a<10) {
int b = 1;
while(b<=a) {
int c = a*b;
System.out.print(a+"*"+b+"="+c+"t");
b++;
}
a++;
System.out.println("");
}
(2)用for循环
for(int i=1;i<=9;i++){
for(int j=1;j<=i;j++){
System.out.print(j+"*"+i+"="+i*j);
if (j
最后:一年是坚持,两年初显见成效,三年完成蜕变。



