#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
cout<<setw(17)<<"*"<<endl;
cout<<setw(18)<<"***"<<endl;
cout<<setw(19)<<"*****"<<endl;
cout<<setw(20)<<"*******"<<endl;
cout<<setw(19)<<"*****"<<endl;
cout<<setw(18)<<"***"<<endl;
cout<<setw(17)<<"*"<<endl;
system("pause");
return 0;
}
额.....这是最简单的程序,思路很简单,怎么会想不到呢....
#include<iomanip>
using namespace std;
int main()
{
cout<<setw(17)<<"*"<<endl;
cout<<setw(18)<<"***"<<endl;
cout<<setw(19)<<"*****"<<endl;
cout<<setw(20)<<"*******"<<endl;
cout<<setw(19)<<"*****"<<endl;
cout<<setw(18)<<"***"<<endl;
cout<<setw(17)<<"*"<<endl;
system("pause");
return 0;
}
额.....这是最简单的程序,思路很简单,怎么会想不到呢....
Sharp your mind!