Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Test {
- public static void main(String[] args) {
- for (int i = 4; i >= 1; i--) {
- for (int j = 1; j <= 4; j++) {
- if (j > i) {
- System.out.print("*");
- } else {
- System.out.print(j);
- }
- }
- for (int j = 4; j >= 1; j--) {
- if (j > i) {
- System.out.print("*");
- } else {
- System.out.print(j);
- }
- }
- System.out.println();
- }
- }
- }
Add Comment
Please, Sign In to add comment