Pattern

 #include<iostream>

using namespace std;


int main() {

// Write your code here

int n;

cin>>n;

int i=1;

while(i<=n){

    int j=1;

    while(j<=n){

        char ch='A'+i+j-2;

        cout<<ch;

        j=j+1;

    }

   cout<<endl;

   i=i+1;

}

    

   

   

}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings