Question: Write down a program using a method to print the triangle patterns given below. The program should prompt the user to input an integer value

Write down a program using a method to print the triangle patterns given below. The program should prompt the user to input an integer value for an input parameter 'n'. 'n' should determine the height and the width of the triangle. The method header should be: public static void starsTriangle(int num) Enter the value of n: 3 Enter the value of n: 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
