Program to print the following pattern

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

Algorithm

  1. Start
  2. Let i be an integer number.
  3. Let j be an integer number.
  4. Let n be a integer number and initialize by 7.
  5. Repeat step 6 to 8 until all value parsed.
  6. Set i = 0 and check i<n;
  7. Set j = 1 and check j <= i;
  8. Print number j+1.
  9. End

JAVA

Python

C program

C# program

PHP program






Latest Courses