Welcome to the Pattern Printing Repository! This repository contains code files that demonstrate various interesting patterns using Java programming language.
Each code file is dedicated to a specific pattern, including the butterfly, diamond shape, and different variations of star and number patterns,as well as solid and hollow rhombus patterns.
-
Butterfly Pattern:Butterfly_pattern.java
-
This program prints a beautiful butterfly pattern using asterisks (*).
-
Example output:
* * ** ** *** *** **** **** ********** ********** **** **** *** *** ** ** * *
-
-
Diamond Shape Pattern: diamond.java
- This program prints a diamond shape pattern using spaces and asterisks (*).
- Example output:
* * * * * * * * * * * * * * * * * * * * * * * * *
-
Star Patterns:star_patterns.java
-
This program demonstrates different star patterns such as the right triangle, left triangle, and pyramid.
-
Example output (right triangle):
* * * * * * * * * * * * * * *
* * * * * * * * * * * * * * *
* * * * * * * * * * * * * * *
-
-
Number Patterns: Numbers_patterns.java
-
This program showcases various number patterns including the number pyramid and number staircase.
-
Example output (number pyramid):
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
#Flyod's Triangle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 0 1 1 0 1 0 1 0 1 1 0 1 0 1
1 212 32123 4321234 543212345
-
-
Solid and Hollow Rhombus Patterns:rhombus_pattern.java
-
Solid Rhombus:
- This program prints a solid rhombus pattern using asterisks (*).
- Example output:
***** ***** ***** ***** *****
-
Hollow Rhombus:
- This program prints a hollow rhombus pattern using spaces and asterisks (*).
- Example output:
***** * * * * * * *****
- arrowhead pattern : arrow_head_pattern
Example Output:
*
**
***
****
***
**
*
- hourglass pattern: hourglass.java
Example Output:
*****
***
*
***
*****
- sprial number : spiral_nos_pattern
Example Output:
1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
- Hollow Diamond: hollow_diamond.java
Example Output:
*
* *
* *
* *
* *
* *
* *
* *
*
Feel free to explore each code file to understand the logic behind the patterns and run them in your Java development environment.
If you have suggestions for more amazing patterns or would like to contribute to this repository, please feel free to open an issue or submit a pull request. I will always appreciate your ideas and contributions!