Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
Printing a triangle refers to generating a pattern using characters or numbers that resembles an equilateral triangle shape on the screen or output device.
Iteration refers to repeating a set of instructions multiple times within a program using loops. In this context, it means repeating steps to print each row and character/number in forming the triangle pattern.
Character/Number Pattern: A character/number pattern is an arrangement or sequence created by combining specific characters (e.g., asterisks) or numbers following certain rules or algorithms. In printing a triangle, the character/number pattern represents the shape and design of the triangle.
Loop termination condition: The loop termination condition is a logical expression that determines when a loop should stop executing. In the context of printing a triangle, it helps determine how many rows need to be printed and when the loop should terminate.