#include<stdio.h>
int main() {
int i,j,a=65,k,n=10;
for (i=n; i>=1; i--) {
for (k=n-1; k>=i; k--) {
printf(" ");
}
for (j=1; j<=i; j++) {
printf("%2c",a++);
}
for (j=i-1; j>=0; j--) {
printf("%2c",--a);
}
printf("\n");
}
}
int main() {
int i,j,a=65,k,n=10;
for (i=n; i>=1; i--) {
for (k=n-1; k>=i; k--) {
printf(" ");
}
for (j=1; j<=i; j++) {
printf("%2c",a++);
}
for (j=i-1; j>=0; j--) {
printf("%2c",--a);
}
printf("\n");
}
}
No comments:
Post a Comment