patternprogram_178 softethics

Pattern 178

C

#include <stdio.h>
#include <math.h>

int main()
{

  int n = 3;
  int i,j;

  for(i = n; i >= -n; i--)
  {
    for(j = 0; j < n-abs(i); j++)
    {
      printf("%c", j + 65);
    }
    printf("\n");
  }
  return 0;
}

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