patternprogram_398 softethics

Pattern 398

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("* ");
    }

    printf("\n");
  }
  return 0;
}

C++

Java

C#

Python

5 2 votes
Rate this Program
Subscribe
Notify of
guest


0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments