Programas DISEÑO
Enviado por Stiven Paúl • 2 de Julio de 2020 • Práctica o problema • 2.564 Palabras (11 Páginas) • 78 Visitas
DISEÑO
- 3.7
public partial class ejercicio1_impar : Form
{
public ejercicio1_impar()
{
InitializeComponent();
}
double sue,por,suet,cont;
private void BTNING_Click(object sender, EventArgs e)
{
for (int i = 0; i < 1; i++)
{
cont++;
if (double.Parse(TXTS.Text) < 10000)
{
por = double.Parse(TXTS.Text) * 0.10;
sue = double.Parse(TXTS.Text) + por;
DGV1.Rows.Add(cont.ToString(), TXTS.Text, por.ToString(), sue.ToString());
}
if (double.Parse(TXTS.Text) >= 10000 & double.Parse(TXTS.Text) < 25000)
{
por = double.Parse(TXTS.Text) * 0.07;
sue = double.Parse(TXTS.Text) + por;
DGV1.Rows.Add(cont.ToString(), TXTS.Text, por.ToString(), sue.ToString());
}
if (double.Parse(TXTS.Text) > 25000)
{
por = double.Parse(TXTS.Text) * 0.08;
sue = double.Parse(TXTS.Text) + por;
DGV1.Rows.Add(cont.ToString(), TXTS.Text, por.ToString(), sue.ToString());
}
suet = suet + sue;
}
if (cont==double.Parse(TXTNT.Text))
}
DGV1.Rows.Add("MONTO TOTAL", "", "", suet.ToString());
}
}
}
}
- 3.9
public partial class ejercicio2_impar : Form
{
public ejercicio2_impar()
{
InitializeComponent();
}
int i,sum,a;
private void btncalcular_Click(object sender, EventArgs e)
{
for (i = 10; i <= 51; i=i+2)
{
a=sum;
sum = a + i;
dataGridView1.Rows.Add(a.ToString(), "+", i.ToString(), "=", sum.ToString());
txtsum.Text = (sum.ToString());
}
}
}
}
- 3.11
public partial class ejercicio3_impar : Form
{
public ejercicio3_impar()
{
InitializeComponent();
}
double spes, salt, ppes, palt, c;
private void BTNING_Click(object sender, EventArgs e)
{
for (int i = 0; i < 1; i++)
{
c++;
salt = salt + double.Parse(TXTA.Text);
spes = spes + double.Parse(TXTP.Text);
DGV1.Rows.Add(c.ToString(),TXTP.Text, TXTA.Text, CBS.Text);
}
TXTA.Text = "";
CBS.Text = "";
TXTP.Text = "";
TXTP.Focus();
if (c==double.Parse(TXTN.Text))
{
ppes = spes / double.Parse(TXTN.Text);
palt = salt / double.Parse(TXTN.Text);
DGV1.Rows.Add("PROMEDIO", ppes.ToString(), palt.ToString());
}
}
}
}
- 3.13
public partial class ejercicio4_impar : Form
{
public ejercicio4_impar()
{
InitializeComponent();
}
double a, b, c, d,con;
private void BTNI_Click(object sender, EventArgs e)
{
for (int i = 0; i < 1; i++)
{
con++;
if ( double.Parse(TXTCALIF.Text) >= 0 & double.Parse(TXTCALIF.Text<= 3.99)
...