ASSIGNMENT3

Include as a comment at the beginning of your source code: Name, Assignment number, Section (either MW or TTH)

Include any comments within your source code to clarify your logic in thecases where this is necessary but avoid commenting the obvious.

In an email to pegramitp120@gmail.com, attach the .java file.

If your first name begins with A-M, do the following:

Write an application that displays the following patterns separately one below the other. Use for loops to generate the patterns. All asterisks (*) should be printed by a single statement of the form System.out.print(*); (this causes the asterisks to print side by side). A statement of the form System.out.println(); can be used to position to the next line. A statement of the form System.out.print( ); can be used to display a space. There should be no other output statements in the program.

*
**
***
****
*****

If your first name begins with N-Z, do the following:

Write an application that displays the following patterns separately one below the other. Use for loops to generate the patterns. All asterisks (*) should be printed by a single statement of the form System.out.print(“*”); (this causes the asterisks to print side by side). A statement of the form System.out.println(); can be used to position to the next line. A statement of the form System.out.print(“ ”); can be used to display a space. There should be no other output statements in the program.

*****
****
***
**
*