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