patternprogram_131 softethics

Pattern 131

C

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

  for(i=0; i<5; i++)
  {
    for(k=4; k>=i; k--)
    {
      printf(" ");
    }
    for(j=0; j<=i; j++)
    {
      printf("%c ",i+65);  // 65 is ASCII of 'A'
    }
    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