01afccea5b
modified: proglabs/lab5/1.c new file: proglabs/lab5/10.c new file: proglabs/lab5/11.c new file: proglabs/lab5/12.c new file: proglabs/lab5/13.c new file: proglabs/lab5/14.c modified: proglabs/lab5/2.c new file: proglabs/lab5/3-1.c new file: proglabs/lab5/3-2.c deleted: proglabs/lab5/3.c new file: proglabs/lab5/4.c new file: proglabs/lab5/5.c new file: proglabs/lab5/6.c new file: proglabs/lab5/7.c new file: proglabs/lab5/8.c new file: proglabs/lab5/9.c new file: proglabs/lab5/tmp.out
26 lines
442 B
C
26 lines
442 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
int r = 5;
|
|
char l;
|
|
for(int i = 1; i <= r; ++i){
|
|
l = 'A';
|
|
|
|
for(int j = 0; j < r - i; ++j){
|
|
printf(" ");
|
|
}
|
|
|
|
for(int j = 0; j < i; ++j){
|
|
printf("%c", l);
|
|
l++;
|
|
}
|
|
l -= 2;
|
|
for(int j = 0; j < i - 1; ++j){
|
|
printf("%c", l);
|
|
l--;
|
|
}
|
|
printf("\n");
|
|
}
|
|
return 0;
|
|
}
|