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 _5
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = 0;
- for (;;)
- {
- n = int.Parse(Console.ReadLine());
- if (1 <= n && n <= 100)
- {
- break;
- }
- else
- Console.WriteLine("ot 1 do 100");
- }
- #region MyRegion
- var str = new string(' ', n);
- Console.Write(str);
- Console.WriteLine(" | ");
- #endregion
- #region MyRegion
- for (int row = 1; row <= n; row++)
- {
- var spaces = new string(' ', n - row);
- Console.Write(spaces);
- var stars = new string('*', row);
- Console.Write(stars);
- Console.Write(" | ");
- Console.Write(stars);
- Console.WriteLine();
- }
- #endregion
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement