Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace problem4Tower
- {
- class Program
- {
- static void Main()
- {
- Console.WriteLine("Enter height:");
- int h = int.Parse(Console.ReadLine());
- int row = h * 2;
- int col = h;
- int doc = h - 1;
- int dash = row * row - 2;
- int a=1;
- int b = 1;
- int doc1 =0;
- int doc2= 0;
- for (int i = 0; i < h; i++)
- {
- Console.Write(new string('.', doc));
- Console.Write(new string('/',a));
- if (i != 1 && i != 3 && i != 7 && i != 11 && i != 15 && i != 20)
- {
- Console.Write(new string('.', doc1));
- }
- else
- {
- Console.Write(new string('-', doc2));
- }
- Console.Write(new string('\\', b));
- Console.Write(new string('.', doc));
- Console.WriteLine();
- doc--;
- dash++;
- doc2 += 2;
- doc1+=2;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement