fork(2) download
#include 

int main()
{
    const int TreeSize = 7; //since it it used more than once, it should be simple to change
    for(int x = 0; x < TreeSize; ++x)
    {
        for(int y = TreeSize; y > x; --y)
        {
            std::cout << " ";
        }
        for(int y = 0; y < x; ++y)
        {
            std::cout << "*";
        }
        std::cout << std::endl;
    }
}
Success #stdin #stdout 0s 2884KB
stdin
Standard input is empty
stdout
       
      *
     **
    ***
   ****
  *****
 ******