public static void Executar()
        {
            Coordenada CoordenadaInicial;

            CoordenadaInicial.X = 2;
            CoordenadaInicial.Y = 2;
            Console.WriteLine(CoordenadaInicial.X);
            Console.WriteLine(CoordenadaInicial.Y);

            var CoordenadaFinal = new Coordenada(9, 1);

            CoordenadaFinal.MoverDiagonal(10);
            Console.WriteLine(CoordenadaFinal.X);
            Console.WriteLine(CoordenadaFinal.Y);
        }
Beispiel #2
0
        public static void Executar()
        {
            Coordenada coordenadaInicial;

            coordenadaInicial.X = 2;
            coordenadaInicial.Y = 2;

            Console.Write("Coordenada inicial: ");
            Console.Write($"X = {coordenadaInicial.X} ");
            Console.WriteLine($"Y = {coordenadaInicial.Y}");

            var coordenadaFinal = new Coordenada(x: 9, y: 1);

            coordenadaFinal.MoverDiagonal(10);

            Console.Write("Coordenada final: ");
            Console.Write($"X = {coordenadaFinal.X} ");
            Console.WriteLine($"Y = {coordenadaFinal.Y}");
        }
Beispiel #3
0
        public static void Executar()
        {
            Console.WriteLine("|------------------------------------------------|");
            Console.WriteLine("|=================< Seção 05 >===================|");
            Console.WriteLine("|========< Classes & Metodos - Struc >===========|");
            Console.WriteLine("|------------------------------------------------|");
            //-----------------------------------------< Código da Aula >---------------------------------//

            Coordenada coordenadaInical;

            coordenadaInical.X = 2;
            coordenadaInical.Y = 2;

            Console.WriteLine($"X = {coordenadaInical.X}");
            Console.WriteLine($"Y = {coordenadaInical.Y}");

            var coordenadaFinal = new Coordenada(x: 9, y: 1);

            coordenadaFinal.MoverDiagonal(10);
            Console.WriteLine("Coordenada Final: ");

            Console.WriteLine($"X = {coordenadaFinal.X}");
            Console.WriteLine($"Y = {coordenadaFinal.Y}");
        }//Fim do Executar