CPlusPlusThings/practical_exercises/10_day_practice/day1/打印练习.cpp
Light-City a4d828bb4c update
2020-04-06 00:57:02 +08:00

25 lines
496 B
C++

#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int i,j,k,f;
for (i=1;i<=4;i++){
for (j=1;j<=30;j++)
cout<<" ";
for (k=1;k<=8-2*i;k++)
cout<<" ";
for (f=1;f<=2*i;f++)
cout<<'*';
cout<<endl;
}
for(i=1;i<=3;i++){
for (j=1;j<=30;j++)
cout<<" ";
for (f=1;f<=7-2*i;f++)
cout<<'*';
cout<<endl;
}
system("pause");
return 0;
}