patternprogram_129 softethics

Pattern 129

C


#include <stdio.h>
#include <conio.h>
int main()
{
  int i,j,k;

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

C++

Java

C#

Python

Tutorial (YouTube)

5 1 vote
Rate this Program
Subscribe
Notify of
guest


0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments