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; } } }
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; } } }