#include"stdio.h"voidmain() {inta,b,c,d;//定义四个变量charzi=65;//字母A的ascall码表对应的数值scanf("%d",&a);//接收你要输入的行数for(c=1;c<=a;c++){//控制行数for(d=1;d<=a-c;d++)//控制打印空格的个数,是一个倒直角三角形{ printf(""); }for(b=1;b<=2*c-1;b++)//...
include <stdio.h>#include <math.h>int main() { char max = '\0'; int i = 0, j = 0, m = 0; puts("请输入A~Z"); scanf("%c", &max); if (max >= 'A' && max <= 'Z') { m = max - 'A'; /* 输入A时 m = 0,输入B时 m = 1 ...
include <stdio.h>int main(){ int n, i, j; char st; scanf ("%d %c", &n, &st); char row = st, col; for (i = 0; i < n; ++i){ for (j = 0; j < n - i - 1; ++j){ printf (" "); } col = row; for (j = 0; j ...