Control Statements Pattern Printing
105 programs in this topic — each includes source code, sample output and explanation.
-
Right-Angled Triangle of Stars
This program prints a right-angled triangle of stars.
-
Inverted Triangle of Stars
This program prints an inverted triangle of stars.
-
Square of Stars
This program prints a square of stars.
-
Hollow Square of Stars
This program prints a hollow square of stars.
-
Pyramid of Stars
This program prints a pyramid of stars.
-
Diamond of Stars
This program prints a diamond of stars.
-
Number Triangle
This program prints a number triangle.
-
Inverted Number Triangle
This program prints an inverted number triangle.
-
Floyd's Triangle
This program prints Floyd's Triangle.
-
Pascal's Triangle (First 5 Rows)
This program prints Pascal's Triangle.
-
Hollow Pyramid of Stars
This program prints a hollow pyramid of stars.
-
Butterfly Pattern of Stars
This program prints a butterfly pattern of stars.
-
Palindromic Number Pyramid
This program prints a palindromic number pyramid.
-
Hollow Diamond of Stars
This program prints a hollow diamond of stars.
-
Alphabet Triangle
This program prints an alphabet triangle.
-
Inverted Alphabet Triangle
This program prints an inverted alphabet triangle.
-
Hollow Number Pyramid
This program prints a hollow number pyramid.
-
Butterfly Pattern with Numbers
This program prints a butterfly pattern with numbers.
-
Palindromic Alphabet Pyramid
This program prints a palindromic alphabet pyramid.
-
Hollow Butterfly Pattern
This program prints a hollow butterfly pattern of stars.
-
Pascal Pyramid with Spacing
This program prints Pascal's Triangle in pyramid form with spacing.
-
Concentric Square of Stars
This program prints concentric squares of stars.
-
Zig-Zag Star Line
This program prints stars in zig-zag line pattern.
-
Concentric Number Square
This program prints concentric squares with numbers.
-
Star Hourglass Pattern
This program prints an hourglass pattern of stars.
-
Concentric Alphabet Square
This program prints concentric squares using alphabets.
-
Star Zig-Zag Wave
This program prints stars in zig-zag wave form.
-
Numeric Hourglass Pattern
This program prints an hourglass pattern with numbers.
-
Alphabet Diamond Pattern
This program prints a diamond pattern using alphabets.
-
Star Concentric Diamond
This program prints concentric diamond patterns using stars.
-
Spiral Number Pattern
This program prints numbers arranged in a spiral inside a square.
-
Hollow Hexagon of Stars
This program prints a hollow hexagon of stars.
-
Spiral Alphabet Pattern
This program prints alphabets arranged in a spiral inside a square.
-
Star-Alphabet Hybrid Pyramid
This program prints a pyramid combining stars and alphabets.
-
Spiral Star Pattern
This program prints stars arranged in a spiral inside a square.
-
Numeric Spiral with Gaps
This program prints numbers in spiral form with gaps.
-
Hollow Hexagon with Numbers
This program prints a hollow hexagon using numbers.
-
Star-Alphabet Checkerboard
This program prints a checkerboard pattern alternating stars and alphabets.
-
Numeric Spiral Diamond
This program prints a diamond filled with sequential numbers in spiral-like growth.
-
Star-Alphabet Hybrid Hexagon
This program prints a hexagon combining stars and alphabets alternately.
-
Spiral Star-Number Hybrid
This program prints a spiral pattern alternating stars and numbers.
-
Hollow Concentric Triangle
This program prints hollow concentric triangles using stars.
-
Zig-Zag Alphabet Wave
This program prints alphabets in zig-zag wave form.
-
Double Spiral Number Pattern
This program prints two spirals of numbers inside a square.
-
Hollow Concentric Triangle with Numbers
This program prints hollow concentric triangles using numbers.
-
Zig-Zag Alphabet Wave with Stars
This program prints alphabets in zig-zag wave form with stars at intersections.
-
Concentric Triangle of Stars and Numbers
This program prints concentric triangles alternating stars and numbers.
-
Alphabet Spiral with Stars
This program prints alphabets in spiral form with stars at corners.
-
Hollow Concentric Triangle Hybrid
This program prints hollow concentric triangles alternating stars and alphabets.
-
Advanced Zig-Zag Alphabet Wave
This program prints an advanced zig-zag alphabet wave with alternating direction.
-
Spiral Number with Diagonal Stars
This program prints a spiral of numbers with stars along diagonals.
-
Hollow Concentric Hexagon of Stars
This program prints a hollow concentric hexagon using stars.
-
Numeric-Alphabet Star Mosaic
This program prints a mosaic alternating numbers, alphabets, and stars.
-
Diagonal Spiral Hybrid
This program prints a spiral of numbers with alphabets on diagonals.
-
Concentric Hexagon Hybrid
This program prints concentric hexagons alternating stars and numbers.
-
Spiral Hybrid with Diagonal Numbers
This program prints a spiral of stars with numbers on diagonals.
-
Numeric-Alphabet Star Grid
This program prints a grid alternating numbers, alphabets, and stars.
-
Hollow Concentric Hexagon with Alphabets
This program prints a hollow concentric hexagon using alphabets.
-
Diagonal Star-Alphabet Hybrid
This program prints stars with alphabets on diagonals.
-
Numeric-Alphabet Star Mosaic Diamond
This program prints a diamond mosaic alternating numbers, alphabets, and stars.
-
Spiral Pyramid of Numbers
This program prints a pyramid filled with numbers in spiral order.
-
Hollow Concentric Circle Approximation
This program approximates concentric circles using stars.
-
Hybrid Grid of Numbers and Stars
This program prints a grid alternating numbers and stars.
-
Spiral Pyramid of Stars
This program prints a pyramid filled with stars in spiral order.
-
Hollow Concentric Circle with Numbers
This program approximates concentric circles using numbers.
-
Spiral Pyramid Hybrid (Stars + Numbers)
This program prints a pyramid filled with stars and numbers in spiral order.
-
Hollow Concentric Circle Hybrid (Stars + Alphabets)
This program approximates concentric circles using stars and alphabets.
-
Advanced Hybrid Grid (Numbers, Alphabets, Stars)
This program prints a grid alternating numbers, alphabets, and stars in sequence.
-
Spiral Pyramid of Alphabets
This program prints a pyramid filled with alphabets in spiral order.
-
Hybrid Concentric Circle Grid
This program approximates concentric circles using numbers, alphabets, and stars.
-
Spiral Hourglass of Numbers
This program prints an hourglass filled with numbers in spiral order.
-
Hollow Concentric Diamond of Stars
This program prints hollow concentric diamonds using stars.
-
Numeric-Alphabet Pyramid Hybrid
This program prints a pyramid alternating numbers and alphabets.
-
Spiral Hourglass of Stars
This program prints an hourglass filled with stars in spiral order.
-
Hollow Concentric Diamond with Numbers
This program prints hollow concentric diamonds using numbers.
-
Advanced Numeric-Alphabet Pyramid
This program prints a pyramid alternating numbers and alphabets in each row.
-
Spiral Hourglass Hybrid (Stars + Alphabets)
This program prints an hourglass filled with stars and alphabets in spiral order.
-
Hollow Concentric Diamond Hybrid (Stars + Alphabets)
This program prints hollow concentric diamonds alternating stars and alphabets.
-
Advanced Numeric-Alphabet Pyramid with Stars
This program prints a pyramid alternating numbers, alphabets, and stars.
-
Spiral Hourglass of Numbers and Alphabets
This program prints an hourglass filled with numbers and alphabets in spiral order.
-
Spiral Rectangle of Numbers
This program prints a rectangular spiral of numbers.
-
Hollow Concentric Pentagon of Stars
This program prints a hollow concentric pentagon using stars.
-
Star-Numeric-Alphabet Lattice
This program prints a lattice alternating stars, numbers, and alphabets.
-
Spiral Rectangle Hybrid (Stars + Numbers)
This program prints a rectangular spiral alternating stars and numbers.
-
Hollow Concentric Pentagon with Numbers
This program prints hollow concentric pentagons using numbers.
-
Star-Numeric-Alphabet Lattice Diamond
This program prints a diamond lattice alternating stars, numbers, and alphabets.
-
Spiral Rectangle of Alphabets
This program prints a rectangular spiral of alphabets.
-
Hollow Concentric Pentagon Hybrid
This program prints hollow concentric pentagons alternating stars and alphabets.
-
Advanced Star-Numeric-Alphabet Lattice Grid
This program prints a grid alternating stars, numbers, and alphabets in advanced cyclic order.
-
Spiral Rectangle Hybrid (Numbers + Alphabets)
This program prints a rectangular spiral alternating numbers and alphabets.
-
Spiral Triangle of Numbers
This program prints a triangular spiral of numbers.
-
Hollow Concentric Octagon of Stars
This program prints a hollow concentric octagon using stars.
-
Advanced Hybrid Hourglass Mosaic
This program prints an hourglass mosaic alternating stars, numbers, and alphabets.
-
Spiral Triangle of Alphabets
This program prints a triangular spiral of alphabets.
-
Hollow Concentric Octagon with Numbers
This program prints a hollow concentric octagon using numbers.
-
Spiral Triangle Hybrid (Numbers + Alphabets)
This program prints a triangular spiral alternating numbers and alphabets.
-
Hollow Concentric Octagon Hybrid (Stars + Alphabets)
This program prints hollow concentric octagons alternating stars and alphabets.
-
Advanced Hybrid Hourglass Mosaic (Numbers + Alphabets)
This program prints an hourglass mosaic alternating numbers and alphabets.
-
Spiral Triangle of Stars
This program prints a triangular spiral of stars.
-
Hollow Concentric Octagon with Hybrid Symbols
This program prints hollow concentric octagons alternating stars, numbers, and alphabets.
-
Spiral Trapezoid of Numbers
This program prints a trapezoid filled with numbers in spiral order.
-
Hollow Concentric Hexagram of Stars
This program prints a hollow concentric hexagram using stars.
-
Advanced Hybrid Concentric Grid (Stars + Numbers)
This program prints a concentric grid alternating stars and numbers.
-
Spiral Trapezoid of Alphabets
This program prints a trapezoid filled with alphabets in spiral order.
-
Hollow Concentric Hexagram with Numbers
This program prints a hollow concentric hexagram using numbers.