โ† Cognizant questions

Print character pattern

Filed under Cognizant

Given an integer `n` (1 <= n <= 26), write a program to generate a triangle pattern of `n` rows where the `i`-th row contains the `i`-th uppercase letter repeated `i` times separated by spaces.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Cognizant questions

Collected from public candidate posts and coding forums. Updated Nov 2026.