Programas En C#
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int C = 0 ;
do
{
C = C + 2;
txtnum.Text = txtnum.Text +C.ToString() + "\r\n";
}
while (C < 40);
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
private void button2_Click(object sender, EventArgs e)
{
txtnum.Clear();
Menor a10 (dowhile)
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int C = 0;do
{
C = C + 1;
txtnum.Text = txtnum.Text + C.ToString() + "\r\n";
}
while (C < 10);
}
privatevoid cmdBorrar_Click(object sender, EventArgs e)
{
txtnum.Clear();
}
private void cmdsalir_Click(object sender, EventArgs e)
{
Close();}
Numeros Impares hasta el 30 (Dowhile)
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e){
int C = 1;
do
{
C = C + 2;
txtnum1.Text = txtnum1.Text + C.ToString() + "\r\n";
}
while (C< 29);
}
private void button2_Click(object sender, EventArgs e)
{
txtnum1.Clear();
}
private void button3_Click(object sender, EventArgse)
{
Close();
}
Menor a 10 (For)
private void button1_Click(object sender, EventArgs e)
{
int C;
for (C = + 2; C < 40; C=C+2)
{
txtn1.Text = txtn1.Text + C.ToString() + "\r\n";
}
}
private void button2_Click(object sender, EventArgs e)...
Regístrate para leer el documento completo.