Open sujana-kamasany opened 2 years ago
My ans: public class Main { public static void main(String[] args) throws Exception { Scanner in = new Scanner(System.in); int a = in.nextInt(); for(int i = 0 ; i < a; i++){ for(int j = 0 ; j < i ;j++){ System.out.print(" "); } for (int j = 0; j < a - i; j++) { System.out.print(" "); } for (int j = 0; j < a - 1 - i; j++) { System.out.print(" "); } System.out.println(); } } }
@DHARUNKUMAR7 thank you for the code! please go ahead and make a pull request
Add Java Program to print inverted pyramid using * and digits