String s = "8"; for (int i = 0; i < 10; i++){ System.out.print(s); for (int j = 10-i; j < 10; j++){ System.out.print(s); } System.out.println(""); }