Control Statements Pattern Printing

105 programs in this topic — each includes source code, sample output and explanation.

  1. Right-Angled Triangle of Stars

    This program prints a right-angled triangle of stars.

  2. Inverted Triangle of Stars

    This program prints an inverted triangle of stars.

  3. Square of Stars

    This program prints a square of stars.

  4. Hollow Square of Stars

    This program prints a hollow square of stars.

  5. Pyramid of Stars

    This program prints a pyramid of stars.

  6. Diamond of Stars

    This program prints a diamond of stars.

  7. Number Triangle

    This program prints a number triangle.

  8. Inverted Number Triangle

    This program prints an inverted number triangle.

  9. Floyd's Triangle

    This program prints Floyd's Triangle.

  10. Pascal's Triangle (First 5 Rows)

    This program prints Pascal's Triangle.

  11. Hollow Pyramid of Stars

    This program prints a hollow pyramid of stars.

  12. Butterfly Pattern of Stars

    This program prints a butterfly pattern of stars.

  13. Palindromic Number Pyramid

    This program prints a palindromic number pyramid.

  14. Hollow Diamond of Stars

    This program prints a hollow diamond of stars.

  15. Alphabet Triangle

    This program prints an alphabet triangle.

  16. Inverted Alphabet Triangle

    This program prints an inverted alphabet triangle.

  17. Hollow Number Pyramid

    This program prints a hollow number pyramid.

  18. Butterfly Pattern with Numbers

    This program prints a butterfly pattern with numbers.

  19. Palindromic Alphabet Pyramid

    This program prints a palindromic alphabet pyramid.

  20. Hollow Butterfly Pattern

    This program prints a hollow butterfly pattern of stars.

  21. Pascal Pyramid with Spacing

    This program prints Pascal's Triangle in pyramid form with spacing.

  22. Concentric Square of Stars

    This program prints concentric squares of stars.

  23. Zig-Zag Star Line

    This program prints stars in zig-zag line pattern.

  24. Concentric Number Square

    This program prints concentric squares with numbers.

  25. Star Hourglass Pattern

    This program prints an hourglass pattern of stars.

  26. Concentric Alphabet Square

    This program prints concentric squares using alphabets.

  27. Star Zig-Zag Wave

    This program prints stars in zig-zag wave form.

  28. Numeric Hourglass Pattern

    This program prints an hourglass pattern with numbers.

  29. Alphabet Diamond Pattern

    This program prints a diamond pattern using alphabets.

  30. Star Concentric Diamond

    This program prints concentric diamond patterns using stars.

  31. Spiral Number Pattern

    This program prints numbers arranged in a spiral inside a square.

  32. Hollow Hexagon of Stars

    This program prints a hollow hexagon of stars.

  33. Spiral Alphabet Pattern

    This program prints alphabets arranged in a spiral inside a square.

  34. Star-Alphabet Hybrid Pyramid

    This program prints a pyramid combining stars and alphabets.

  35. Spiral Star Pattern

    This program prints stars arranged in a spiral inside a square.

  36. Numeric Spiral with Gaps

    This program prints numbers in spiral form with gaps.

  37. Hollow Hexagon with Numbers

    This program prints a hollow hexagon using numbers.

  38. Star-Alphabet Checkerboard

    This program prints a checkerboard pattern alternating stars and alphabets.

  39. Numeric Spiral Diamond

    This program prints a diamond filled with sequential numbers in spiral-like growth.

  40. Star-Alphabet Hybrid Hexagon

    This program prints a hexagon combining stars and alphabets alternately.

  41. Spiral Star-Number Hybrid

    This program prints a spiral pattern alternating stars and numbers.

  42. Hollow Concentric Triangle

    This program prints hollow concentric triangles using stars.

  43. Zig-Zag Alphabet Wave

    This program prints alphabets in zig-zag wave form.

  44. Double Spiral Number Pattern

    This program prints two spirals of numbers inside a square.

  45. Hollow Concentric Triangle with Numbers

    This program prints hollow concentric triangles using numbers.

  46. Zig-Zag Alphabet Wave with Stars

    This program prints alphabets in zig-zag wave form with stars at intersections.

  47. Concentric Triangle of Stars and Numbers

    This program prints concentric triangles alternating stars and numbers.

  48. Alphabet Spiral with Stars

    This program prints alphabets in spiral form with stars at corners.

  49. Hollow Concentric Triangle Hybrid

    This program prints hollow concentric triangles alternating stars and alphabets.

  50. Advanced Zig-Zag Alphabet Wave

    This program prints an advanced zig-zag alphabet wave with alternating direction.

  51. Spiral Number with Diagonal Stars

    This program prints a spiral of numbers with stars along diagonals.

  52. Hollow Concentric Hexagon of Stars

    This program prints a hollow concentric hexagon using stars.

  53. Numeric-Alphabet Star Mosaic

    This program prints a mosaic alternating numbers, alphabets, and stars.

  54. Diagonal Spiral Hybrid

    This program prints a spiral of numbers with alphabets on diagonals.

  55. Concentric Hexagon Hybrid

    This program prints concentric hexagons alternating stars and numbers.

  56. Spiral Hybrid with Diagonal Numbers

    This program prints a spiral of stars with numbers on diagonals.

  57. Numeric-Alphabet Star Grid

    This program prints a grid alternating numbers, alphabets, and stars.

  58. Hollow Concentric Hexagon with Alphabets

    This program prints a hollow concentric hexagon using alphabets.

  59. Diagonal Star-Alphabet Hybrid

    This program prints stars with alphabets on diagonals.

  60. Numeric-Alphabet Star Mosaic Diamond

    This program prints a diamond mosaic alternating numbers, alphabets, and stars.

  61. Spiral Pyramid of Numbers

    This program prints a pyramid filled with numbers in spiral order.

  62. Hollow Concentric Circle Approximation

    This program approximates concentric circles using stars.

  63. Hybrid Grid of Numbers and Stars

    This program prints a grid alternating numbers and stars.

  64. Spiral Pyramid of Stars

    This program prints a pyramid filled with stars in spiral order.

  65. Hollow Concentric Circle with Numbers

    This program approximates concentric circles using numbers.

  66. Spiral Pyramid Hybrid (Stars + Numbers)

    This program prints a pyramid filled with stars and numbers in spiral order.

  67. Hollow Concentric Circle Hybrid (Stars + Alphabets)

    This program approximates concentric circles using stars and alphabets.

  68. Advanced Hybrid Grid (Numbers, Alphabets, Stars)

    This program prints a grid alternating numbers, alphabets, and stars in sequence.

  69. Spiral Pyramid of Alphabets

    This program prints a pyramid filled with alphabets in spiral order.

  70. Hybrid Concentric Circle Grid

    This program approximates concentric circles using numbers, alphabets, and stars.

  71. Spiral Hourglass of Numbers

    This program prints an hourglass filled with numbers in spiral order.

  72. Hollow Concentric Diamond of Stars

    This program prints hollow concentric diamonds using stars.

  73. Numeric-Alphabet Pyramid Hybrid

    This program prints a pyramid alternating numbers and alphabets.

  74. Spiral Hourglass of Stars

    This program prints an hourglass filled with stars in spiral order.

  75. Hollow Concentric Diamond with Numbers

    This program prints hollow concentric diamonds using numbers.

  76. Advanced Numeric-Alphabet Pyramid

    This program prints a pyramid alternating numbers and alphabets in each row.

  77. Spiral Hourglass Hybrid (Stars + Alphabets)

    This program prints an hourglass filled with stars and alphabets in spiral order.

  78. Hollow Concentric Diamond Hybrid (Stars + Alphabets)

    This program prints hollow concentric diamonds alternating stars and alphabets.

  79. Advanced Numeric-Alphabet Pyramid with Stars

    This program prints a pyramid alternating numbers, alphabets, and stars.

  80. Spiral Hourglass of Numbers and Alphabets

    This program prints an hourglass filled with numbers and alphabets in spiral order.

  81. Spiral Rectangle of Numbers

    This program prints a rectangular spiral of numbers.

  82. Hollow Concentric Pentagon of Stars

    This program prints a hollow concentric pentagon using stars.

  83. Star-Numeric-Alphabet Lattice

    This program prints a lattice alternating stars, numbers, and alphabets.

  84. Spiral Rectangle Hybrid (Stars + Numbers)

    This program prints a rectangular spiral alternating stars and numbers.

  85. Hollow Concentric Pentagon with Numbers

    This program prints hollow concentric pentagons using numbers.

  86. Star-Numeric-Alphabet Lattice Diamond

    This program prints a diamond lattice alternating stars, numbers, and alphabets.

  87. Spiral Rectangle of Alphabets

    This program prints a rectangular spiral of alphabets.

  88. Hollow Concentric Pentagon Hybrid

    This program prints hollow concentric pentagons alternating stars and alphabets.

  89. Advanced Star-Numeric-Alphabet Lattice Grid

    This program prints a grid alternating stars, numbers, and alphabets in advanced cyclic order.

  90. Spiral Rectangle Hybrid (Numbers + Alphabets)

    This program prints a rectangular spiral alternating numbers and alphabets.

  91. Spiral Triangle of Numbers

    This program prints a triangular spiral of numbers.

  92. Hollow Concentric Octagon of Stars

    This program prints a hollow concentric octagon using stars.

  93. Advanced Hybrid Hourglass Mosaic

    This program prints an hourglass mosaic alternating stars, numbers, and alphabets.

  94. Spiral Triangle of Alphabets

    This program prints a triangular spiral of alphabets.

  95. Hollow Concentric Octagon with Numbers

    This program prints a hollow concentric octagon using numbers.

  96. Spiral Triangle Hybrid (Numbers + Alphabets)

    This program prints a triangular spiral alternating numbers and alphabets.

  97. Hollow Concentric Octagon Hybrid (Stars + Alphabets)

    This program prints hollow concentric octagons alternating stars and alphabets.

  98. Advanced Hybrid Hourglass Mosaic (Numbers + Alphabets)

    This program prints an hourglass mosaic alternating numbers and alphabets.

  99. Spiral Triangle of Stars

    This program prints a triangular spiral of stars.

  100. Hollow Concentric Octagon with Hybrid Symbols

    This program prints hollow concentric octagons alternating stars, numbers, and alphabets.

  101. Spiral Trapezoid of Numbers

    This program prints a trapezoid filled with numbers in spiral order.

  102. Hollow Concentric Hexagram of Stars

    This program prints a hollow concentric hexagram using stars.

  103. Advanced Hybrid Concentric Grid (Stars + Numbers)

    This program prints a concentric grid alternating stars and numbers.

  104. Spiral Trapezoid of Alphabets

    This program prints a trapezoid filled with alphabets in spiral order.

  105. Hollow Concentric Hexagram with Numbers

    This program prints a hollow concentric hexagram using numbers.

Quick Links to Explore