#C863. Digit Triangle Pattern
Digit Triangle Pattern
Digit Triangle Pattern
You are given a single integer (n). Your task is to generate a right-angled triangle pattern of digits. For each row (i) from 1 to (n), print the digit (i) repeated (i) times. Each row is printed on a new line. If (n \leq 0), output nothing.
For example, if (n = 5), the output should be:
1 22 333 4444 55555
Write a program that reads the input from standard input and prints the appropriate pattern to standard output.
inputFormat
The input consists of a single integer (n) ((n \in \mathbb{Z})). The integer is provided via standard input.
outputFormat
Print the digit triangle pattern to standard output. For a positive integer (n), the output should consist of (n) lines where the (i)-th line contains the digit (i) repeated (i) times. If (n \leq 0), nothing should be printed.## sample
0