Saturday, September 6, 2014

Pattern Programming in Java





1.     Write the code to print the following pattern.


1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
1 2 3 4 5 6 7 
1 2 3 4 5 6 7 8

Pattern 1



2.   Write a code to display the following pattern.


# # # # # # #
#                #
#                #
#                #
#                #
# # # # # # #


No comments:

Post a Comment