Advertisement
simonradev

Fifth

Apr 30th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.88 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 Rocket
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int size = int.Parse(Console.ReadLine());
  14.  
  15.             int rightPart = ((size * 3) - 2) / 2;
  16.             int leftPart = rightPart;
  17.  
  18.             //PRINTING THE TOP PART
  19.             for (int i = 0; i < size; i++)
  20.             {
  21.                 Console.Write(new string('.', leftPart - i));
  22.                 Console.Write("/");
  23.                 Console.Write(new string(' ', i * 2));
  24.                 Console.Write("\\");
  25.                 Console.WriteLine(new string('.', rightPart - i));
  26.             }
  27.  
  28.             int halfSize = size / 2;
  29.  
  30.             //PRINTING THE STATIC PART AFTER THE TOP ONE
  31.             Console.Write(new string('.', halfSize));
  32.             Console.Write(new string('*', 2 * size));
  33.             Console.WriteLine(new string('.', halfSize));
  34.  
  35.             int someRandomFormule = 2 * size - 2;
  36.  
  37.             //printing the body part
  38.             for (int i = 0; i < size * 2; i++)
  39.             {
  40.                 Console.Write(new string('.', halfSize));
  41.                 Console.Write('|');
  42.                 Console.Write(new string('\\', someRandomFormule));
  43.                 Console.Write('|');
  44.                 Console.WriteLine(new string('.', halfSize));
  45.             }
  46.  
  47.             //PRINTING THE TAIL OF THE PART
  48.             for (int i = 0; i < size / 2; i++)
  49.             {
  50.                 Console.Write(new string('.', halfSize - i));
  51.                 Console.Write("/");
  52.                 Console.Write(new string('*', (3 * size) - (size + 2) + (2 * i)));
  53.                 Console.Write("\\");
  54.                 Console.WriteLine(new string('.', halfSize - i));
  55.  
  56.                 //someRandomFormule += 2;
  57.             }
  58.         }
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement