I'm having trouble creating a program to make the two patterns below. I have to make a case statement to allow the user to select which pattern and then have the user select how many dots will be on the longest row. The stars should be generated using nested loops.
n=5
* * * * *
* * * *
* * *
* *
*
n=5 (Pryamid without the underscores)(I just did that to show how the patter is supposed to look)
______*
___*__*__*
*__*__*__*__*
Any help would be great. I'm really confused on this topic.