Documentos de Académico
Documentos de Profesional
Documentos de Cultura
namespace _4_operaciones
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
if (rdbsuma.Checked == true)
{
operacion = numero1 + numero2;
}
else if (rdbresta.Checked == true)
{
operacion = numero1 - numero2;
}
else if (rdbmultiplicacion.Checked == true)
{
operacion = numero2 * numero2;
}
else
{
operacion = numero1 / numero2;
}
txtresultado.Text = operacion.ToString();
namespace EJERCICIO_2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
1.
EJERCICIO 3-Serie fibonaci
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 EJERCICIO3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
namespace EJERCICIO4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
label5.Text = textBox1.Text;
label5.Text = textBox2.Text;
label5.Text = textBox3.Text;
}
{
if (a < b && a > c || a > b && a < c)
label7.Text = textBox1.Text;
label7.Text = textBox2.Text;
label7.Text = textBox3.Text;
}
{
if (a < b && a < c)
label9.Text = textBox1.Text;
label9.Text = textBox2.Text;
else if (c < a && c < b)
label9.Text = textBox3.Text;
}
}
}
}
EJERCICIO 5-Realizar un programa que pida al usuario dos números y presente los números
impares que hay desde el primer número al segundo que introdujo el usuario.
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 EJERCICIO5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
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 Otra_ves
public Form1()
InitializeComponent();
int i;
if (i % 2 != 0)
listBox1.Items.Add(i);
int p;
listBox1.Items.Add(p);
listBox1.Items.Clear();
}
EJERCICIO 8
Un programa que pida al usuario dos valores y con esos valores se cree un
vector con sus elementos pares y el otro vector con elementos impares
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 WindowsFormsApp7
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
if (num % 2 == 0)
{
textBox3.Text= ("ES PAR");
}
else
{
textBox3.Text = ("ES IMPAR");
}
if (num1 % 2 == 0)
{
textBox4.Text = ("ES PAR");
}
else
{
textBox4.Text = ("ES IMPAR");
}
}
}
Ejercicio 9
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 divicion_y_su_resto_form
{
public Form1()
InitializeComponent();
num = Convert.ToInt32(textBox1.Text);
fin = Convert.ToInt32(textBox2.Text);
listBox1.Items.Clear();