patternprogram_44 softethics

Pattern 44

C

#include<stdio.h>


int main()
{
  int i,j,k=0;
  int n=4; // size

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

}

C++

Java

C#

Python

0 0 votes
Rate this Program
Subscribe
Notify of
guest


0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments