Star Patterns
50 star pattern programs in C, C++, Java and Python. Each one has the output, a row-by-row diagram…
Know more Star PatternsPick a collection and practise one pattern at a time, from simple triangles to spirals.
Every program is compiled and run in C, C++, Java and Python before it is published.
See the exact text each program prints, so you can check your own result line by line.
A picture of every row shows how many spaces and characters it needs, and why.
Each pattern breaks the loops down into simple formulas you can reuse for new shapes.
All patterns and tutorials are free to read, copy and practise. No account needed.
Pattern programs are a favourite in coding tests; practise the classics and their variations.
Tell us the pattern you want to print and we will publish it with tested code in C, C++, Java and Python.
Cookies on Pattern Programs
We would like to use cookies to understand how the site is used. Analytics cookies are only set if you accept. You can change your choice at any time with “Cookie settings” at the bottom of the page. Cookie policy