#include<iostream>
using namespace std;
int main()
{
int i=0,j=0;
for(j=1;j<=7;j++)
{
if(j<=4)
{
for(i=1;i<=2*j-1;i++)
{
cout
<<"*";
}
cout
<<endl;
}
else
{
for(i=1;i<=15-2*j;i++)
{
cout
<<"*";
}
cout
<<endl;
}
}
system(
"pause");
return 0;
}

结果如下图

VS2010下的第一个C++程序

相关文章:

  • 2021-11-11
  • 2021-10-23
  • 2021-10-11
  • 2021-12-08
  • 2021-07-01
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2021-05-23
  • 2021-12-16
  • 2022-01-11
  • 2021-09-19
相关资源
相似解决方案