Practice/fresherFloyd's Triangle
⏱ 00:00
Best: 0/100
Sequential NumberingTarget Time: 10 mins

Floyd's Triangle

Given an integer N, print Floyd's Triangle of N rows. The triangle is populated with consecutive natural numbers starting from 1 onwards across rows.

Input Format
A single integer N.
Output Format
Print N rows with consecutive integers separated by spaces.
Constraints:1 <= N <= 15
Concepts Required:
Continuous accumulator variableConsecutive sequence across row transitions
Expected Pattern PreviewASCII Monospace
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

Notice how character spacing and row counts scale systematically based on the input N.

Concrete Examples

Example 1
Input:
5
Output:
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

Explanation: Numbers continue monotonically: 1, then 2, 3, then 4, 5, 6, etc.

← Back to All Challenges