Mostrando entradas con la etiqueta Estructura selectiva simple y doble. Mostrar todas las entradas
Mostrando entradas con la etiqueta Estructura selectiva simple y doble. Mostrar todas las entradas

Ordenar mayor a menor




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 numero20
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
//Variables
int numero1, numero2, numero3, mayor, intermedio, menor;

private void textBox1_TextChanged(object sender, EventArgs e)
{
numero1 = int.Parse(textBox1.Text);
}

private void textBox2_TextChanged(object sender, EventArgs e)
{
numero2 = int.Parse(textBox2.Text);
}

private void textBox3_TextChanged(object sender, EventArgs e)
{
numero3 = int.Parse(textBox3.Text);
}


Devuelve el número mayor





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 numero3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

       //Variables

       int numero1, numero2, mayor = 0;

      //Entrada

            private void textBox1_TextChanged(object sender, EventArgs e)
   {
   numero1 = int.Parse(textBox1.Text);
   }

          private void textBox2_TextChanged(object sender, EventArgs e)
  {
  numero2 = int.Parse(textBox2.Text);
   }

        //Proceso y salida