123456789101112131415
#include <iostream> #include <string> using namespace std; int main() { for (int i = 0; i < 9; ++i) cout << "\t" << string(abs(4 - i), ' ') << string(9 - 2 * abs(4 - i), '*') << endl; cout << endl; return 0; }