Secuencia de escape y código ASCII

En esta sección se resolverán dudas sobre C sharp, el lenguaje de programación de Microsoft, compatible con Unity

Moderator: julianmartinez16

User avatar
xacarana
Site Admin
Posts: 1028
Joined: Fri Jan 15, 2016 6:13 pm

Secuencia de escape y código ASCII

Post by xacarana » Wed Aug 17, 2016 11:40 am

Ejemplo de clase:

Code: Select all

            /*
            double x,t,j;//Declarar una variable         
            int y;//Declarar una variable
            float z;//Declarar una variable

            x = 3;//Se inicializa la variable con un valor  constante o literal
            y = 0;//Se inicializa la variable con un valor  constante o literal
            z = 3;//Se inicializa la variable con un valor  constante o literal

            Console.WriteLine(x+y+z);*/

            //Secuencias de escape
            Console.WriteLine("\"hola\"");//Secuencia de escape comillas dobles

            Console.Write("1");
            Console.Write("2\n");//Secuencia de escape salto de línea
            //Console.WriteLine("2");
            Console.Write("4");
            Console.Write("1");

            Console.WriteLine("\\");//Secuencia de escape backslash

            /*
             Práctica impresión
             * 1. Ir al sitio web ascci art
             * 2. Seleccionar un personaje (sencillo) hecho en ascii
             * 3. Escriba el código necesario para imprimirlo en un programa
             * 4. Valide que el programa compile
             * 5. Ejecute el programa
             */

            Console.WriteLine("                      ___            __________");
            Console.WriteLine("                     /   \\          /          \\");
            Console.WriteLine("                 __/_/_/_\\________/ / / /  /   \\");
            Console.WriteLine("          ,,----'                 ------  / /   \\           _");
            Console.WriteLine("        ,/   ) ) ) ) ) ) ) ) ) ) ) ) ) ) )\\/ /  /        ,/' \\");
            Console.WriteLine("    ./''  ,\\  ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )\\ /       /'  /  \\");
            Console.WriteLine("./''  O , ,\\) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )------' / / / /");
            Console.WriteLine("(____ , , , ,|) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )----- /");
            Console.WriteLine("\\.  \\ , , , | ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ----- \\");
            Console.WriteLine("  `\\.   ___/ ) )_______  ) ) ) ) ) ) ) ) ) ) ) ------. \\ \\ \\ \\");
            Console.WriteLine("      ``\\..) ) ) )______\\) ) ) ) ) ) ) ) ) ) /         \\.  \\  /");
            Console.WriteLine("           `\\..    _____/ ) ) ) ) ) ) ) ) /--__          `\\._/");
            Console.WriteLine("               ``\\________________------'''\\   \\");
            Console.WriteLine("                   \\ \\ \\/           \\  \\  \\ \\  /");
            Console.WriteLine("                    \\__/             \\________/  Carl Pilcher");

            Console.ReadKey();
Andrés Bedoya Tobón
Profesor
"I only smile in the dark, I only smile when it's complicated" Raybiez

User avatar
sergioich1
Posts: 27
Joined: Fri Jul 22, 2016 10:13 am

Re: Secuencia de escape y código ASCII

Post by sergioich1 » Wed Aug 17, 2016 11:47 am

Code: Select all

namespace Ejercicio
{
    class Program
    {
        static void Main(string[] args)
        {

  	Console.WriteLine ("              _ _");
		Console.WriteLine(" ____________/ / \\_.)_");
		Console.WriteLine(" `.     ,'   @_@_/ ,'|");
  		Console.WriteLine(" `-.-'        , / /|");
  		Console.WriteLine("    `-.____,-'  | ||");
		Console.WriteLine("             \\  \\ ||");
  		Console.WriteLine("            |  | \\|");
		Console.WriteLine("             /   \\     ,,'");
		Console.WriteLine("             |    \\   //");
		Console.WriteLine("            /      |  ||");
		Console.WriteLine("            |    ,-\\ //");
		Console.WriteLine("            |   _\\  \\||");
		Console.WriteLine("           (_`-(_____)/");  
            
          
               Console.ReadKey();
        }
    }
}

Image
Sergio Cardona 8-)
Fundamentos de programación.

User avatar
estebanc1503
Posts: 56
Joined: Fri Jul 22, 2016 10:06 am

Re: Secuencia de escape y código ASCII

Post by estebanc1503 » Wed Aug 17, 2016 11:49 am

Console.WriteLine("* * * /\\__/\\ * --- *");
Console.WriteLine(" * / \\ / \\ ");
Console.WriteLine(" * * | - - | | |* ");
Console.WriteLine(" * __________| \\ /| | | ");
Console.WriteLine(" / \\ T / | \\ / ");
Console.WriteLine(" / | * --- ");
Console.WriteLine("| || | | / *");
Console.WriteLine("| || /______\\ / |* * ");
Console.WriteLine("| | \\ | / \\ / | ");
Console.WriteLine(" \\/ | |\\ \\ | | \\ \\ ");
Console.WriteLine(" | | \\ \\ | | \\ \\ ");
Console.WriteLine(" | | \\ \\ | | \\ \\ ");
Console.WriteLine(" ''' ''' ''' ''' ");
Console.ReadKey();
Image

User avatar
JoseDavid97
Posts: 70
Joined: Fri Jul 22, 2016 10:48 am

Re: Secuencia de escape y código ASCII

Post by JoseDavid97 » Wed Aug 17, 2016 11:51 am

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace condicionales
{
class Program
{
static void Main(string[] args)
{



Console.WriteLine(" _ .----. ");
Console.WriteLine(" (_\\/ \\_, ");
Console.WriteLine(" 'uu----uu~'");

Console.ReadKey();

}

}
}


Image
Image

ManuelTheo
Posts: 22
Joined: Fri Jul 22, 2016 10:11 am

Re: Secuencia de escape y código ASCII

Post by ManuelTheo » Wed Aug 17, 2016 11:51 am

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ejemplo_condicionales
{
class Program
{
static void Main(string[] args)
{

Console.WriteLine(" _");
Console.WriteLine(" (_)");
Console.WriteLine(" | .");
Console.WriteLine(" . |L /| . _");
Console.WriteLine(" _ . |\\ _| \\--+._/| . (_)");
Console.WriteLine(" / ||\\| Y J ) / |/| ./");
Console.WriteLine(" J |)'( | ` F`.'/ _");
Console.WriteLine(" -<| F __ .-< (_)");
Console.WriteLine(" | / .-'. `. /-. L___");
Console.WriteLine(" J \\ < \\ | | O\\|.-' _");
Console.WriteLine(" _J \\ .- \\/ O | | \\ |F (_)");
Console.WriteLine(" '-F -<_. \\ .-' `-' L__");
Console.WriteLine("__J _ _. >-' )._. |-'");
Console.WriteLine("`-|.' /_. \\_| F");
Console.WriteLine(" /.- . _.<");
Console.WriteLine(" /' /.' .' `\\");
Console.WriteLine(" /L /' |/ _.-'-\\");
Console.WriteLine(" /'J ___.---'\\|");
Console.WriteLine(" |\\ .--' V | `. `");
Console.WriteLine(" |/`. `-. `._)");
Console.WriteLine(" / .-.\\");
Console.WriteLine(" \\ ( `\\");
Console.WriteLine(" `.\\");


Console.ReadKey();
}
}
}

Image

User avatar
pipevarela98
Posts: 27
Joined: Fri Jul 22, 2016 10:20 am

Secuencia de escape

Post by pipevarela98 » Wed Aug 17, 2016 11:54 am

REFERENCIA
Image

Code: Select all

namespace Ejercicio_Juan_F_Varela
{
    class Program
    {
        static void Main(string[] args)
        {
            /*double x; //declarar variable
            int y;
            float z;
            z = 3;
            y = 0;
            x = 3;
            Console.WriteLine (x + y + z);*/

            Console.WriteLine("South Park");
            Console.WriteLine("   _O_       ");
            Console.WriteLine(" /     \\    ");
            Console.WriteLine("|==/=\\==| ");
            Console.WriteLine("|  O O  |  ");
            Console.WriteLine(" \\  V  /   ");
            Console.WriteLine(" /`---'\\");
            Console.WriteLine(" O'_:_`O ");
            Console.WriteLine("  -- --  ");
            Console.WriteLine ("  STAN");
          

            Console.ReadKey();
         }
    }
}
Juan Felipe Varela :evil: 8-) 8-)

Ing. en Diseño de Ent. Digital
Universidad Pontificia Bolivariana
2016

User avatar
JorgeIglesias
Posts: 37
Joined: Fri Jul 22, 2016 10:51 am

Re: Secuencia de escape y código ASCII

Post by JorgeIglesias » Wed Aug 17, 2016 11:55 am

namespace Ejemplo_Condicionales
{
class Program
{
static void Main(string[] args)
{
/*
double x; //Declarar una variable
int y; //Declarar una variable
float z; //Declarar una variable

x = 0.0;//Se inicializa la variable con un Valor constante o literal
y = 0; //Se inicializa la variable con un valor constante o literal
z = 3.4F; //Se inicializa la variable con un valor constante o literal

Console.WriteLine(x+y+z);
*/

Console.WriteLine("\"Hola Mundo\"");// Secuencia de escape comillas dobles
Console.Write("12\n");
Console.Write("41\n");

/*
* Practica impresión
* 1. Ir al sitio web ascci art
* 2. Seleccionar un personaje (Sencillo) hecho en ascii
* 3. Escriba el codigo necesario para imprimirlo en un programa
* 4. valide que el programa compile
*/

Console.WriteLine(" _==/ i i \\==_");
Console.WriteLine(" /XX/ |\\___/| \\XX\\");
Console.WriteLine(" /XXXX\\ |XXXXX| /XXXX\\");
Console.WriteLine(" |XXXXXX\\_ _XXXXXXX_ _/XXXXXX|");
Console.WriteLine(" XXXXXXXXXXXxxxxxxxXXXXXXXXXXXxxxxxxxXXXXXXXXXXX");
Console.WriteLine("|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|");
Console.WriteLine("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
Console.WriteLine("|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|");
Console.WriteLine(" XXXXXX/^^^^\"\\XXXXXXXXXXXXXXXXXXXXX/^^^^^\\XXXXXX");
Console.WriteLine(" |XXX| \\XXX/^^\\XXXXX/^^\\XXX/ |XXX|");
Console.WriteLine(" \\XX\\ \\X/ \\XXX/ \\X/ /XX/");
Console.WriteLine(" \"\\ \" \\X/ \" /\" I'm Batman");


Console.ReadKey();
}
}
}
Attachments
Captura de pantalla (2).png
Flaming Horns Studios
:twisted: Experiences so powerful they could reap your soul! :twisted:

Jorge L. Iglesias
Estudiante de entretenimiento digital
4 semestre
Clase 10 - 12
Mier, Vier

User avatar
felipegrisalesc
Posts: 27
Joined: Tue Aug 02, 2016 6:15 pm

Re: Secuencia de escape y código ASCII

Post by felipegrisalesc » Wed Aug 17, 2016 11:55 am

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication7
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(" (()__(()");
Console.WriteLine(" / \\ ");
Console.WriteLine(" ( / \\ \\");
Console.WriteLine(" \\ o o /");
Console.WriteLine(" (_()_)__/ \\");
Console.WriteLine(" / _,==.____ \\");
Console.WriteLine(" ( |--| )");
Console.WriteLine(" /\\_.|__|'-.__/\\");
Console.WriteLine(" / ( / \\");
Console.WriteLine(" \\ \\ ( /");
Console.WriteLine(" ) '._____) / ");
Console.WriteLine(" (((____.--(((____/mrf");
Console.ReadKey();
}
}
}

Image

User avatar
maxiferado
Posts: 43
Joined: Fri Jul 22, 2016 10:17 am

Re: Secuencia de escape y código ASCII

Post by maxiferado » Wed Aug 17, 2016 11:58 am

Console.WriteLine(" ,c$$$ccc,. .,,.");
Console.WriteLine(" .,cchc $$$$$$$$$$$c, ,c$$$$$$c");
Console.WriteLine(" ,$$$$$$$ ?$$$$$$$\"\"\"',,c$$$$$??\"\"$$L");
Console.WriteLine(" c$$$$$$$$$:<$$$$$$$$$$$$?????\"\",n ?$$$");
Console.WriteLine(" ,$$$$$$$$$$$ J$$$$$$F\"$$$$h uMMMMMMb $$$-.,,,,.");
Console.WriteLine(" c$$$$$$$$$$$F,$$$$$$P',$$$$$ MP\"\"\"\"MM,?$$cJ$$$$$$");
Console.WriteLine(" $$$$$$$$$$$$F J$$$$$$c$$$$$$$.' 4M J?????$F $$");
Console.WriteLine(" ,$$$$$F\"$$$$$F J$$$$$$$$$$$$??$$c, ,' xdMbn, d$$");
Console.WriteLine(" $$$L`P',$$$$F J$$$$$$$$$$$$$ d$$$$$$$$$ xPPPPMMM $$P");
Console.WriteLine(" $$$',$$$$$$P J$$$$$$$$$$$$$$cc$$$$$$$$$ 4MP $$F");
Console.WriteLine(" , $$$$$$$$P\" J$$$$$$$$$$$$$$$$$$$$$$$$$$h JP' $$'");
Console.WriteLine(" $c \"$$$P\"'..: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$c,,... J$$");
Console.WriteLine(" d$$$c,,. .::::.?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$cJ$F");
Console.WriteLine(" ,$$$$$$$$$ ::::: ?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$'");
Console.WriteLine(" z$$$$$$$$$F :::: .?$$$$$$$$$$$$$$$$$$$$$$$$$$.\"$\")$$$$$$");
Console.WriteLine(" z$$$$$$$$$$> :: ,dL`$$$$$$$$$$$$$$$$$$$$$$$$$$$ccd$$$$$$$c");
Console.WriteLine(" .d$$$.`\" $$$$'.: uMM\" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.");
Console.WriteLine(" $$$F\"$P\"$$$$$ : P\" . $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
Console.WriteLine("$$$$$hcc$$$$$$ :...:' ?$$h`\"\".$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$h");
Console.WriteLine("$$$$$$$$$$$$$$ ``_` ,M>`$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.");
Console.WriteLine("$$$$$$$$$$$$$$ dMP JMM\" \"\"3$$\"$\"3$$$$$$$????$$$$$$$$$$$$$$$$$$h");
Console.WriteLine("$$$$$$$$$$$$$$ P dMP .:`$$$$$ccc$$$$$$(,cccc ?$$$$$$$$$$$$$$$$$L");
Console.WriteLine("$$$$$$$$$$$$$P ..' .::: $$$$$$$$$$$$$$$????$L $$$$$$$$$$$$$$$$$$");
Console.WriteLine("$$$$$$$$$$$$$F :::'''::' ?$$$$$$$$$$$$$Lcch ?$ $$$$$$$$$$$$$$$$$$c");
Console.WriteLine("$$$$$$$$$$$$$F ' ,mn ',db ?$$$$$$$$$$$$$$$$',$$$$$$$$$$$$$$$$$$$$$.");
Console.WriteLine("$$$$$$$$$$$$$L nMM\" ,dMMP '$$$$$$$$$$$$$$$P $$$$$$$$$$$$$$$$$$$$$$h");
Console.WriteLine("$$$$$?$$$$$$$$ MP . MP\" .. 3$C\"\"$$$$$$$$$$cd$$$$$$$$$$$$$$$$$$??$?$.");
Console.WriteLine("$$$$$ $$$$$$$$ \" ::....:::: 3$cd$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$hccc$$");
Console.WriteLine("$$$$$ $$$$$$$$ ::''`,`:' ,n $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$???$$$$$r");
Console.WriteLine("$$$$$ $$$$$$$$$ ,ndM .'.dMM `?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ccc$$$$$F");
Console.WriteLine("$$$$P $L`\".$$$$.4MM\" .'.MP\"... ?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\"\" ,.");
Console.WriteLine("C\"\",dc`$$$$$$$$F`\" .::....:::: .\"?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$hJ$$$$L");
Console.WriteLine("$$$$$$r'$$$$C\"$$ ::::::``:::: nMb.\"?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
Console.WriteLine("$$$$$$$ \"$$$$ $$c `` ,nM .:' dMP\" . \"$$$$$$$$$$$$$$$$$$$$$$$$$$\".,.`$P");
Console.WriteLine("$$$$$$$$c ?$$.\"$$c 4MM\" .:: `\" .::' , ?$$$$$$$$$$$$$$$$$$$$$$$L,$$P \"");
Console.WriteLine("$$$$$$$$$$.`?h $$$c 4'.:::'::'':: uMMM- \"?$$$$$$$$\"??3$$$$$$$$$$P\"");
Console.WriteLine("$$$$$$$$$$$h.` `$$$h ''` ,mnr .:',MP\" .: \"?$$$$$$$P?$$$$$$$$$P");
Console.WriteLine("$$$$$$$$$$$$$hc `$$$$c =MMP\" :::. .:: ,dMn.\"?$?$$hc,.$$$$$$P");
Console.WriteLine("$$$$.\"\"$$$$$$P\" \"?$$h,\"P .::',nmn :: JMMP\".. ` -z$$$$$$$$$\"");
Console.WriteLine("$$$$$$$$$$$$\" \"$$$h, ``,nMMP .:: \"\"..::',nMp`\"?$$$$$P'");
Console.WriteLine("$$$$$$$$$$P \"$$$hc 4P\"'.::'''_``:`,nMP\" `\"\"'");
Console.WriteLine("$$$$$$$$P\" \"?$$$c.'''',ndP\" -' `\"");
Console.WriteLine("$$$$$$$\" `?$$$c, \"4P'.. c");
Console.WriteLine("$$$$$\" \"?$$$hc, ``,P");
Console.WriteLine("$$P\" \"?$$$$cc$'");
Console.WriteLine("\"\" cccc, \"\"\"\"");
Console.WriteLine(" `\"?$$h.");
Console.WriteLine(" .,,. `?$$.");
Console.WriteLine(" $$$$hc, ?$$.");
Console.WriteLine(" \"??$$$$c,3$$");
Console.WriteLine(" \"?$$$F");
Console.WriteLine(" ,$hd$P");
Console.WriteLine(" ,$$$\"");
Console.WriteLine(" ,$$$\"");
Console.WriteLine(" ,$$$F");
Console.WriteLine(" ,$$$$");
Console.WriteLine("J$$$$F");
Console.WriteLine("$$$$$'");
Console.WriteLine("$$$$F");
Console.WriteLine("$$$F");
Console.WriteLine("$$F");
Console.WriteLine("P'");
Attachments
Captura de pantalla (3).png
Captura de pantalla (1).png
Captura de pantalla (2).png
Diego Alejandro Jaime Baron
Estudiante de entretenimiento digital, 3 semestre clase 10-12 8-)

User avatar
David Ballesteros V
Posts: 51
Joined: Fri Jul 22, 2016 11:04 am

Re: Secuencia de escape y código ASCII

Post by David Ballesteros V » Wed Aug 17, 2016 5:50 pm

Console.WriteLine(" /| |\\");
Console.WriteLine(" `__\\\\ //__'");
Console.WriteLine(" || ||");
Console.WriteLine(" \\__`\\ | '__/");
Console.WriteLine(" `_\\ //_'");
Console.WriteLine(" _.,:---;,._");
Console.WriteLine(" \\_: :_ /");
Console.WriteLine(" |@. .@|");
Console.WriteLine(" | |");
Console.WriteLine(" ,\\.-./ \\");
Console.WriteLine(" ; ;`-' `---__________-----.-.");
Console.WriteLine(" ; ; ; \\_\\");
Console.WriteLine(" ';;; |");
Console.WriteLine(" ; | ;");
Console.WriteLine(" \\ \\ \\ | /");
Console.WriteLine(" \\_, \\ / \\ |\\");
Console.WriteLine(" |';| |,,,,,,,,/ \\ \\ \\_");
Console.WriteLine(" | | | \\ / |");
Console.WriteLine(" \\ \\ | | / \\ |");
Console.WriteLine(" | || | | | | |");
Console.WriteLine(" | || | | | | |");
Console.WriteLine(" | || | | | | |");
Console.WriteLine(" |_||_| |_| |_|");
Console.WriteLine(" /_//_/ /_/ /_/");

Console.ReadKey();
deer.png
deer.png (2.7 KiB) Viewed 2437 times
David Ballesteros Villa
Fundamentos De Programación - P.O.O

-Contacto:
Correo: Personal: dsktod@gmail.com Institucional: david.ballesteros@upb.edu.co

Post Reply