Pattern in cpp/c Program

Pattern in c/cpp Program

 #include <iostream>

using namespace std;
int main() {
int n;
cin>>n;
int i=1;
while(i<=n){
int j=1;
while(j<=n){
char ch='A'+j-1;
cout<<ch<<" ";
j++;
}
cout<<endl;
i++;
}
}

Post a Comment

0 Comments