Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.98 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Globalization;
  7. namespace numsTo100inText
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.  
  15.             int hash = (4 * n) + 1;
  16.             int dots = 1;
  17.             int spaces = 1;
  18.             int leftHash = n * 2 - 1;
  19.  
  20.             int seconDots = n + 1;
  21.             int secontHash = n * 2 - 1;
  22.             Console.WriteLine(new string('#',hash));
  23.             hash -= 2;
  24.  
  25.             for (int i = 1; i <= n/2; i++)
  26.             {
  27.                   Console.WriteLine(new string('.', dots) + new string('#', leftHash) + new string(' ', spaces) + new string('#', leftHash) + new string('.', dots));
  28.                     dots++;
  29.                     leftHash -= 2;
  30.                     spaces += 2;
  31.          
  32.              
  33.                 }
  34.  
  35.  
  36.            
  37.                 Console.WriteLine(new string('.', dots) + new string('#', leftHash) + new string(' ', n / 2 - 1) + "(@)" + new string(' ', n / 2 - 1) + new string('#', leftHash) + new string('.', dots));
  38.                 dots++;
  39.                 leftHash -= 2;
  40.                 spaces += 2;
  41.             for (int i = n/2; i <=n-2; i++)
  42.             {
  43.                 Console.WriteLine(new string('.', dots) + new string('#', leftHash) + new string(' ', spaces) + new string('#', leftHash) + new string('.', dots));
  44.                 dots++;
  45.                 leftHash -= 2;
  46.                 spaces += 2;
  47.  
  48.             }
  49.  
  50.             Console.WriteLine(new string('.', seconDots) + new string('#', secontHash) + new string('.', seconDots));
  51.             for (int i = 2; i <=n; i++)
  52.             {
  53.                 seconDots++;
  54.                 secontHash -= 2;
  55.                 Console.WriteLine(new string('.', seconDots) + new string('#', secontHash) + new string('.', seconDots));
  56.             }
  57.          
  58.         }
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement