public static void main(String[] args) { for(int i=1, count=1; i<=9;count++){ System.out.print(count*i + " "); if(count==i){ System.out.println(); i+=1; count=0; } } }
时间: 2024-10-18 03:18:21
public static void main(String[] args) { for(int i=1, count=1; i<=9;count++){ System.out.print(count*i + " "); if(count==i){ System.out.println(); i+=1; count=0; } } }