Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Svetlina_Lab
- {
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- int num = int.Parse(Console.ReadLine());
- int width = num * 3;
- int dots = (width - 2) / 2;
- int spaces = 0;
- for(int i = 1; i <= num; i++)
- {
- Console.WriteLine("{0}{1}{2}{3}{0}",
- new string('.', dots),
- new string('/', 1),
- new string(' ', spaces),
- new string('\\', 1));
- dots--;
- spaces += 2;
- }
- int intDots = num / 2;
- int asterixNum = num * 2;
- Console.WriteLine("{0}{1}{0}",
- new string('.', intDots),
- new string('*', asterixNum));
- int outerDotsNum = num / 2;
- int slashesNum = num * 2 - 2;
- for (int i = 1; i <= num * 2; i++)
- {
- Console.WriteLine("{0}{1}{2}{1}{0}",
- new string('.', outerDotsNum),
- new string('|', 1),
- new string('\\', slashesNum));
- }
- int dotDots = num / 2;
- int asterAsterix = width - (dotDots * 2 + 2);
- for (int i = 1; i <= num / 2; i++)
- {
- Console.WriteLine("{0}{1}{2}{3}{0}",
- new string('.', dotDots),
- new string('/', 1),
- new string('*', asterAsterix),
- new string('\\', 1));
- dotDots--;
- asterAsterix += 2;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement