A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

//输出递增系类的,循环嵌套
#include <stdio.h>
//*
//* * *
//* * * * *
//* * * * * * *

  int main()
{
    char ch  = '*';
    for (int a=1;a<=4;a++)
    {   for(int i= 1;i<=2*a-1;i++){
                printf("%c ",ch );
    }
        printf("\n");
        }
    return 0 ;

}

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马