Skip to content

A C program that prints various star patterns using user input, including squares, triangles, pyramids, and diamonds - both solid and hollow.

Notifications You must be signed in to change notification settings

shohibulislam/star-pattern-printer-C-Program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Star Pattern Printer in C

Welcome to the Star Pattern Printer, a C-based console program that generates a variety of star (*) shapes based on user input.

Features

This program supports 12 unique patterns:

  1. Square
  2. Hollow Square
  3. Right-angled Triangle (Left-Aligned)
  4. Right-angled Triangle (Right-Aligned)
  5. Inverted Triangle (Left-Aligned)
  6. Inverted Triangle (Right-Aligned)
  7. Full Pyramid
  8. Inverted Full Pyramid
  9. Full Hollow Pyramid
  10. Inverted Full Hollow Pyramid
  11. Diamond
  12. Hollow Diamond

Input Validation

  • Pyramid and Diamond shapes require odd numbers.
  • Minimum size for complex shapes (like pyramids or diamonds) is 3.

Examples

Diamond (Size = 5):

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

Hollow Square (Size = 4):

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

About

A C program that prints various star patterns using user input, including squares, triangles, pyramids, and diamonds - both solid and hollow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages