miércoles, 17 de septiembre de 2014

Mostrar texto oculto Visual C#

 private void button1_Click(object sender, EventArgs e)
        {
            label1.Text = textBox1.Text;
        }

Cambiar fuente en Visual C#


 private void negrita_CheckedChanged(object sender, EventArgs e)
        {
            textBox1.Font = new Font(textBox1.Font.Name, textBox1.Font.Size, textBox1.Font.Style ^ FontStyle.Bold);
        }


 private void cursiva_CheckedChanged(object sender, EventArgs e)
        {
            textBox1.Font = new Font(textBox1.Font.Name, textBox1.Font.Size, textBox1.Font.Style ^ FontStyle.Italic);
        }

sábado, 6 de septiembre de 2014

Videojuego en c# sencillo

Si tienes alguna duda o agregame para platicar:
 Facebook:https://www.facebook.com/Josue.Developer
Twitter: https://twitter.com/playground_100

Juego conecta 4 en c#


Si tienes alguna duda o agregame para platicar:
 Facebook:https://www.facebook.com/Josue.Developer
Twitter: https://twitter.com/playground_100

Editor de texto visual c#

Si tienes alguna duda o agregame para platicar:
 Facebook:https://www.facebook.com/Josue.Developer
Twitter: https://twitter.com/playground_100

Blog de notas C#

Si tienes alguna duda o agregame para platicar:
 Facebook:https://www.facebook.com/Josue.Developer
Twitter: https://twitter.com/playground_100

Teorema de Newton en c#

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

namespace TeoremaDeNewton
{
    class Program
    {
        static void Main(string[] args)
        {
            double n; //numero
            double aprox; //aproximacion de la raiz cuadrada
            double antaprox; //anterior aproximacion a la raiz cuadrada
            double epsilon; //coeficiente de error

            do
            {
                Console.Write("Número: ");
                n = Convert.ToDouble(Console.Read());
            }

            while (n < 0);
            do
            {
                Console.WriteLine("Raiz cuadrada aproximada: ");
                aprox = Convert.ToDouble(Console.Read());
            }

            while (aprox <= 0);
            do
            {
                Console.WriteLine("Coeficiente de error: ");
                epsilon = Convert.ToDouble(Console.Read());


            }

            while (epsilon <= 0);
            do
            {
                antaprox = aprox;
                aprox = (n/antaprox + antaprox) / 2;
            }

            while (Math.Abs(aprox - antaprox) >= epsilon);
            Console.WriteLine("La raiz cuadrada de {0:F2} es {1:F2}", n, aprox);

            Console.ReadLine();

        }

    }
   
}
Si tienes alguna duda o agregame para platicar:
 Facebook:https://www.facebook.com/Josue.Developer
Twitter: https://twitter.com/playground_100

Obtener codigo unicode de cada letra C#

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

namespace CUnicode
{
    class Program
    {
        static void Main(string[] args)
        {
            int car = 0;
            Console.WriteLine("Introduzca texto: ");
            Console.WriteLine("Para terminar pulse Ctrl+z\n");
           

            while ((car=Console.Read())>-1)

            {
                if (car != '\r' && car != '\n')

                    Console.WriteLine("El codigo unicode de "+ ( char)car+" es:"+ car);

            }

            Console.ReadLine();


        }
    }
}
Si tienes alguna duda o agregame para platicar:
 Facebook:https://www.facebook.com/Josue.Developer
Twitter: https://twitter.com/playground_100

Pitagoras en c#

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

namespace ctPitagoras
{
    class Program
    {
        static void Main(string[] args)
        {
         
            //Teorema de pitagoras

            int x = 1, y = 1, z = 0;
            Console.WriteLine("Z\t" + "X\t" + "Y");
            Console.WriteLine("__________________________");

            while(x<50)

            {
                //cALCULAR Z.COMO Z ES UN ENTERO.ALMACENA
                //LA PARTE ENTERA DE LA RAIZ CUADRADA

                z = (int)Math.Sqrt(x*x+y*y);

                while(y<=70 && z<=70)

                {
                    //si la raiz anterior fue exacta
                    //escribir z,x e y
                    if (z * z == x * x + y * y)

                        Console.WriteLine(z+"\t" +x+" \t"+y);
                    y = y + 1;
                    z = (int)Math.Sqrt(x*x+y*y);
                }

                x=x+1;y=x;

             
            }

            Console.ReadLine();

        }
    }
}
Si tienes alguna duda o agregame para platicar:
 Facebook:https://www.facebook.com/Josue.Developer
Twitter: https://twitter.com/playground_100


Convertir metros a pulgadas c#

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

namespace pulgadaMetro
{
    class Program
    {
        static void Main(string[] args)
        {
            double metro, pulgada;
                int contador;

            Console.WriteLine("Conversión de metros a pulgada");
            Console.WriteLine();
            contador = 0;

            for (pulgada = 1.0; pulgada <= 144.0; pulgada++)
            {
                metro = pulgada / 39.37;
                Console.WriteLine(pulgada + " pulgadas esquivale a " + metro + " metros");
                contador++;

                if (contador == 12)
                {
                    Console.WriteLine();
                    contador = 0;
                }
            }
            Console.ReadLine();
           
        }
    }
}

Si tienes alguna duda o agregame para platicar:
 Facebook:https://www.facebook.com/Josue.Developer
Twitter: https://twitter.com/playground_100