include <stdio.h>int main(){int m=0,n=0,i=0,j=0,k=0;scanf("%d%d",&m,&n);for (i=0;i<n;i++){for (k=0;k<i;k++){printf(" ");}for(j=0;j<m;j++){printf("*");}printf("\n");}return 0;}4 3
include <math.h> int main(void){ int i,j,n=0;scanf("%d", &n);for (i = 0; i < n; i++){ for (j = 0; j < i; j++){ printf(" ");} for (j = 0; j < n; j++){ printf("*");} printf("\n");} return 0;} ...
m=m-2;for(i=1;i<=n-1;i++) // 实现n-1行输出 { m=m-2; //“*”前一行比下一行多两个for(k=0;k<=z;k++) //实现z个空格输出 printf(" ");for(j=m;j>=1;j--) // 实现m个“*”输出 printf("*");z++; //每一行的空格输出+1 printf("\n");}...