Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Task03FirTree
- {
- class Program
- {
- static void Main(string[] args)
- {
- int height = int.Parse(Console.ReadLine());
- int star = 1;
- for (int i = height - 2; i >= 0; i--)
- {
- Console.WriteLine(string.Format("{0}{1}{0}", new string('.', i), new string('*', star)));
- star += 2;
- }
- Console.WriteLine(string.Format("{0}*{0}", new string('.', height - 2)));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement