17款gmc育空:是关于C++的问题,是Win32 Console Application,想大家来帮忙

来源:百度文库 编辑:神马品牌网 时间:2024/05/01 04:46:44
我的问题是:输出以下图案
*
***
*****
*******
*****
***
*

请帮忙啊!谢谢啊!!
能否用for语句来写,我想请大家帮忙用for语句来写,谢谢啊

#include <iostream>
using namespace std;
void main()
{
cout<<" *\n"<<" ***\n"<<" *****\n"<<"*******\n"<<" *****\n"<<" ***\n"<<" *\n";
return;
}

我同意. :D