patternprogram_431 softethics

Pattern 431

C

#include<stdio.h>

int main()
{
  int i,j,k;
  int n=5;

  for (i=1; i<=n; i++)
  {
    for (j=1; j<=i; j++)
    {
      for (k=1; k<=j; k++)
      {
        printf("%d ",i);
      }
      printf("\n");
    }
    printf("\n");
  }
  return 0;
}

C++

Java

C#

Python

5 1 vote
Rate this Program
Subscribe
Notify of
guest


0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments