pattern question
#include<iostream>
using namespace std;
int main() {
// Write your code here
int n;
cin>>n;
int i=0;
while(i<n){
char ch='A';
int j=ch;
while(j<'A'+n){
cout<<ch;
ch=ch+1;//characters ascii value can be added
j=j+1;
}
cout<<endl;
i=i+1;
}
}
Comments
Post a Comment