using System;
public class Test
{
public static void Main()
{
Console.WriteLine("Please enter number of triangles of your tree: ");
int n = int.Parse(Console.ReadLine());
for (int i = 1; i <= n; i++)
{
for (int j = 0; j < i; j++)
{
string branch = new String('*', j);
Console.WriteLine(branch.PadLeft(n + 3) + "*" + branch);
}
}
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCUNvbnNvbGUuV3JpdGVMaW5lKCJQbGVhc2UgZW50ZXIgbnVtYmVyIG9mIHRyaWFuZ2xlcyBvZiB5b3VyIHRyZWU6ICIpOwoJCWludCBuID0gaW50LlBhcnNlKENvbnNvbGUuUmVhZExpbmUoKSk7CgkJCgkJZm9yIChpbnQgaSA9IDE7IGkgPD0gbjsgaSsrKQoJCXsKCQkgICAgZm9yIChpbnQgaiA9IDA7IGogPCBpOyBqKyspCgkJICAgIHsKCQkgICAgICAgIHN0cmluZyBicmFuY2ggPSBuZXcgU3RyaW5nKCcqJywgaik7CgkJICAgICAgICBDb25zb2xlLldyaXRlTGluZShicmFuY2guUGFkTGVmdChuICsgMykgKyAiKiIgKyBicmFuY2gpOwoJCSAgICB9CgkJfQoJfQp9