You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
289 B
22 lines
289 B
2 years ago
|
#include<bits/stdc++.h>
|
||
|
using namespace std;
|
||
|
int main() {
|
||
|
int n,m,j,i;
|
||
|
scanf("%d %d",&n,&m);
|
||
|
char a[n][m];
|
||
|
for(i=0; i<n; i++) {
|
||
|
for(j=0; j<m; j++) {
|
||
|
if(i<=j) {
|
||
|
a[i][j]=65+j-i;
|
||
|
} else {
|
||
|
a[i][j]=65+i-j;
|
||
|
}
|
||
|
printf("%c",a[i][j]);
|
||
|
}
|
||
|
printf("\n");
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|