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 _01.X
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- var spaces = n;
- // горна част
- // spaces on left
- for (var i = 0; i < (n / 2) + 1; i++) // 2 , 3 , 4 , 5 , 6 ....
- {
- Console.Write(new string('/', i));
- //първи х
- Console.Write("x");
- // spaces between x- s /// towa var6i rabota
- spaces = spaces - 2;
- if (spaces < 0)
- {
- break;
- }
- Console.Write(new string('_', spaces));
- // втори х
- Console.Write("x");
- // нов ред
- Console.WriteLine();
- }
- Console.WriteLine();
- // долна част
- var newspaces = 0;
- for (var k = n ; n > 0; k--)
- {
- newspaces = k ;
- Console.Write(new string('/' , newspaces));
- Console.Write("x");
- // Console.Write("x");
- Console.WriteLine();
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement