Exemplo n.º 1
0
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());

        int firstPart = (2 * n + 3) - 4;

        Console.Write(new string('*', 1));
        Console.Write("\\");
        Console.Write(new string('-', firstPart));
        Console.Write("/");
        Console.Write(new string('*', 1));
        Console.WriteLine();

        int dash = firstPart - 0;

        for (int i = 2; i <= n; i++)
        {
            Console.Write(new string('*', i));
            Console.Write("\\");
            Console.Write(new string('-', dash - 2));
            Console.Write("/");
            Console.Write(new string('*', i));
            Console.WriteLine();
            dash -= 2;
        }
        int asterisksFirst  = n;
        int asterisksSecond = n / 2;

        for (int i = 0; i < n / 3; i++)
        {
            Console.Write(new string('|', 1));
            Console.Write(new string('*', asterisksSecond));
            Console.Write("\\");
            Console.Write(new string('*', asterisksFirst));
            Console.Write("/");
            Console.Write(new string('*', asterisksSecond));
            Console.Write(new string('|', 1));
            Console.WriteLine();
            asterisksFirst -= 2;
            asterisksSecond++;
        }
        for (int i = 1; i <= n; i++)
        {
            Console.Write(new string('-', i));
            Console.Write("\\");
            Console.Write(new string('*', firstPart));
            Console.Write("/");
            Console.Write(new string('-', i));
            firstPart -= 2;
            Console.WriteLine();
        }
        Console.WriteLine();
        COnsole.ReadLine();
    }
        static void Main(string[] args)
        {
            int    postcode1, postcode2;
            string adress1, adress2;

            Console.WriteLine("Write your first postcode");
            postcode1 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Write your first adress");
            adress1 = COnsole.ReadLine();
            Console.Clear();
            Console.WriteLine("Write your second postcode");
            postcode2 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Write your second adress");
            adress2 = COnsole.ReadLine();
        }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     int[] array = COnsole.ReadLine().Split().Select(int.Parse).ToArray();
 }