For loops

Programming Fundamentals DSA practice problem on Onlearn.

Difficulty: easy.

Topics: What is a For Loop and Why is it Used?, Loops, Conditional Statements, Input/Output Operations, iteration, general programming, mathematical operations, conditional logic, For Loop, Control Flow, Loops & Iteration, Nested Loops.

Print a Right Angled Triangle Pattern Problem Statement Given an integer N, your task is to print a right angled triangle pattern composed of asterisks ( ). The triangle should have N rows, where the i th row (1 indexed) contains i asterisks. Input Specification The input will consist of a single integer N on a new line. Output Specification Print the right angled triangle pattern as described above. Each row of asterisks should be followed by a newline character. Constraints 1 <= N <= 100 Sample Test Cases Sample Input 1 Sample Output 1 Sample Input 2 Sample Output 2