编写程序,打印以下图形(用星号打印正立的的三角形)

#include<stdio.h>
int main(void)
{
	int a, b, c;
	for (a = 1; a <= 4; a++)
	{
		for (b = 4; b >= a; b--)
		{
			printf(" ");

		}
		for (c = 1; c <= 2*a-1; c++)
		{
			printf("*");
		}
		printf("\n");

	}
	return 0;
}

 

 

    原文作者:微风“!”
    原文地址: https://blog.csdn.net/weixin_61637140/article/details/120916496
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞