Code, can't call, C language code

CSDN Q & A 2021-12-30 05:48:31 阅读数:216

code language code


How do you play this

Refer to the answer 1:
/** A BBB CCCCCDDDDDDD ...**/#include <stdio.h>int main(void){ int n,i,b,c; char ch = 'A'; printf(" Please enter the number of lines you want to print :\n"); scanf("%d",&n); for(i = 1;i <= n;i++) //i Is the number of rows in the pyramid The size is determined by the input value n determine  { for(b = 0;b < n - i;b++) //b Is the number of spaces in a line  { putchar(' '); } for(c = 0;c < 2 * i - 1;c++) //c Is the number of letters in a line  { printf("%c",ch); } printf("\n"); ch++; // After printing a line ,ch Proceed again ++; } return 0;}1

Refer to the answer 2:
版权声明:本文为[CSDN Q & A]所创,转载请带上原文链接,感谢。