Pattern:
0
0 1
0 2 4
0 3 6 9
0 4 8 12 16
....
....
0 9 18 27 36 45 54 63 72 81
Source Code:
public class DisplayPatterns {
public static
void main(String[] args) {
for(int
i=0;i<10;i++){
for(int j=0;i<10;j++){
System.out.print(i*j + “ ”);
}
System.out.print(" "+i*j);
}
}
}
Output:
No comments:
Post a Comment