1 for(int a =1; a<10; a++) 2 { 3 for(int b =1; b < a + 1 ; b++) 4 { 5 if(b< 10) 6 { 7 int c = b * a; 8 9 System.out.print(b + " * "+ a + " = " +c); 10 } 11 System.out.print(" "); 12 } 13 System.out.println(); 14 }
时间: 2024-10-14 04:52:29
1 for(int a =1; a<10; a++) 2 { 3 for(int b =1; b < a + 1 ; b++) 4 { 5 if(b< 10) 6 { 7 int c = b * a; 8 9 System.out.print(b + " * "+ a + " = " +c); 10 } 11 System.out.print(" "); 12 } 13 System.out.println(); 14 }