I am having an awful time submitting the right program for this star pattern. Any help will be appreciated. This is the only one I am having trouble with.
2.4: Star Pattern
Write a program that displays the following pattern:
*
***
*****
*******
*****
Help please! Can someone write this correctly for me?
I input the following:
// Program Challenge 2.4
2
3 public class PC24
4 {
5 public static void main(String[ ] args)
6
7 /** \n Newline Advances the cursor to the next line for subsequent printing p.42*/
8
9 {
10
11 System.out.println(" *\n"+ " ***\n"+" *****\n"+"*******\n"+ " *****\n");
12
13
14 }
15 }