ALPHAPATTERN_editorial

Practice

Author: [Shadab Shaikh](sshadab_148 | CodeChef User Profile for shadab shaikh | CodeChef
Tester: Shadab Shaikh
Editorialist: Shadab Shaikh

DIFFICULTY:

CAKEWALK

PREREQUISITES:

None

PROBLEM:

Nil wants to draw a pattern for his assignment. However, Nil is too busy now, so he has asked you for help. Your task is very simple. Just print the pattern for the corresponding NN value by observing sample test cases.

SOLUTIONS:

[details=“Setter’s Solution”]
#include
using namespace std;

int main()
{
int t,n;
cin>>t>>n;
for(int i=1;i<=t;i++)
{
for(int j=1;j<=n;j++)
{
for(int k=1;k<=j;k++)
{
cout<<char(64+k)<<" ";
}
cout<<endl;
}
}
return 0;
}