Question
1) Write a program to print thefollowing :
(a) * (b) *****
** ****
* ** ***
* * ** **
2)
0
1 2
3 4 5
Hint: Use triple nested for loop that tries all thepossibilities.
Explanation / Answer
I'm not sure why a triple nested loop is suggested. Possiblyif you need to print multiple versions of these designs, but youdid not specify user input. I will write methods that takes a height parameter and prints theresulting output. You can call these methods (and code youruser input) from your main method. 1. a) publicstatic void printStars(intheight) { // rows for(int r = 0; r