Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _07.ChristmasTree
- {
- class ChristmasTree
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i <= n; i++)
- {
- var stars = new string('*', i);
- var spaces = new string(' ', n-i);
- Console.Write(spaces);
- Console.Write(stars);
- Console.Write(" | ");
- Console.Write(stars);
- Console.WriteLine(spaces);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement