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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!