Algorithm
- Start
- Let i be an integer number.
- Let j be an integer number.
- Let n be a integer number and initialize by 1.
- Repeat step 6 to 9 until all value parsed.
- Set i = 0 and check i<6;
- Set j = 1 and check j <= i;
- Print number n.
- Then n++;
- End
In this program, we are creating a right-angled triangle of numbers in increasing order. We are creating two loops, and 2nd loop is executing according to the first loop, inside 2nd loop printing the number row-wise i loop times.
1
2 3
4 5 6
7 8 9 10
JAVA
Python
C program
C# program
PHP program
need an explanation for this answer? contact us directly to get an explanation for this answer