Advertisement
DidiMilikina

Parallelepiped

May 3rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 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.  
  7. namespace Axe
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var num = int.Parse(Console.ReadLine());
  14.             var width = 3 * num + 1;
  15.             var hight = 4 * num + 1;
  16.  
  17.             var waves = num - 2;
  18.             Console.Write('+');
  19.             Console.Write(new string('~', waves));
  20.             Console.Write('+');
  21.             Console.WriteLine(new string('.', width - waves - 2));
  22.  
  23.             var points = width - waves - 3;
  24.             for (int row = 0; row < 2 * num + 1; row++)
  25.             {
  26.                 Console.Write('|');
  27.                 Console.Write(new string('.', row));
  28.                 Console.Write('\\');
  29.                 Console.Write(new string('~', num - 2));
  30.                 Console.Write('\\');
  31.                 Console.WriteLine(new string('.', points));
  32.                 points--;
  33.             }
  34.  
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement