Floyd's Triangle Problem

Floyd's Triangle Problem — ExecCode School DSA Practice

Solve the Floyd's Triangle problem on ExecCode. Free online school DSA practice in Patterns. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Given an integer N, print Floyd's Triangle pattern with N rows. Your task is to solve Floyd's Triangle. The triangle starts with 1 and sequentially numbers each position.

Examples

Input 4; Output 1 2 3 4 5 6 7 8 9 10. Input 4; Output 1 2 3 4 5 6 7 8 9 10

Constraints

1 <= N <= 20

Practice Floyd's Triangle free on ExecCode. Browse DSA problems, topic map, and placement guides.