How do I correctly print this triangle of characters?
问题 This code asks the user for a triangle height and a letter. import java.util.*; public class triangle { public static void main(String [] args) { Scanner kb = new Scanner(System.in); int size = 0; Character c; System.out.println("Enter height of the triangle : "); size = kb.nextInt(); System.out.println("Which character you want to use : "); c = kb.next().charAt(0); int i, j, k; for (i = 0; i < size + 1; i++) { for (j = size; j > i; j--) { System.out.print(" "); } for (k = 0; k < (2 * i - 1);