patternprogram_181 softethics

Pattern 181

C

#include<stdio.h>

#include<math.h>
int main()
{
  int size=3;
  int i,j,k;

  for(i=size; i>=-size; i--)
  {
    for(j=1; j<=abs(i); j++)
    {
      printf(" ");
    }

    for(k=size; k>=abs(i); k--)
    {
      printf("%d",k);
    }
    printf("\n");
  }
  return 0;
}

C++

Java

C#

Python

Tutorial (YouTube)

0 0 votes
Rate this Program
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments