ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Ejercicios correspondientes Asesorías complementarias.


Enviado por   •  24 de Agosto de 2017  •  Documentos de Investigación  •  696 Palabras (3 Páginas)  •  96 Visitas

Página 1 de 3

Ejercicios correspondientes al día 10 de julio de 2017. Asesorías complementarias.

Instrucciones:

Elabora los siguientes programas en el lenguaje C# y pega tu código para entregar

1.- El área de un triángulo.

[pic 1]

CODIGO

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace Programa_1

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private void textBox2_TextChanged(object sender, EventArgs e)

        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)

        {

        }

        private void button1_Click(object sender, EventArgs e)

        {

            int bas = 0, Altura = 0, Area = 0;

            bas = Convert.ToInt16(textBox1.Text);

            Altura = Convert.ToInt16(textBox2.Text);

            Area = (bas*Altura)/2;

            textBox3.Text = Area.ToString();

            textBox1.Enabled = false;

            textBox2.Enabled = false;

            textBox3.Enabled = false;

        }

        private void button2_Click(object sender, EventArgs e)

        {

            textBox1.Clear();

            textBox2.Clear();

            textBox3.Clear();

            textBox1.Enabled = true;

            textBox2.Enabled = true;

            textBox1.Focus();

        }

        private void button3_Click(object sender, EventArgs e)

        {

            Application.Exit();

        }

    }

...

Descargar como (para miembros actualizados)  txt (3 Kb)   pdf (119 Kb)   docx (31 Kb)  
Leer 2 páginas más »
Disponible sólo en Clubensayos.com