You are on page 1of 4

1

Programa Suma

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

private void BtnLimpiar_Click(object sender, EventArgs e)


{
TxtN1.Text = "";
TxtN2.Text = "";
TxtSuma.Text = "";
}

private void BtnCalcular_Click(object sender, EventArgs e)


{
double N1, N2, Suma;
N1 = double.Parse(TxtN1.Text);
N2 = double.Parse(TxtN2.Text);
Suma = N1 + N2;
TxtSuma.Text = Suma.ToString();
}

private void BtnSalir_Click(object sender, EventArgs e)


{
this.Close();
}
}
}
2

Programa Promedio de los Tres Parciales

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

private void label5_Click(object sender, EventArgs e)


{

private void BtnLimpiar_Click(object sender, EventArgs e)


{
TxtP1.Text = "";
TxtP2.Text = "";
TxtP3.Text = "";
TxtPP3.Text = "";
TxtEQ.Text = "";
TxtOchenta.Text = "";
TxtVeinte.Text = "";
TxtPQ.Text = "";

private void BtnCalcular_Click(object sender, EventArgs e)


{
double P1, P2, P3, PP3, EQ, Ochenta, Veinte, PQ;
P1 = double.Parse(TxtP1.Text);
3

P2 = double.Parse(TxtP2.Text);
P3 = double.Parse(TxtP3.Text);
EQ = double.Parse(TxtEQ.Text);
PP3 = (P1 + P2 + P3) / 3;
Ochenta = PP3 * 0.8;
Veinte = EQ * 0.2;
PQ = Ochenta + Veinte;
TxtPP3.Text = PP3.ToString();
TxtOchenta.Text=Ochenta.ToString();
TxtVeinte.Text=Veinte.ToString();
TxtPQ.Text = PQ.ToString();
}

private void BtnSalir_Click(object sender, EventArgs e)


{
this.Close();
}

private void TxtPP3_TextChanged(object sender, EventArgs e)


{

private void label8_Click(object sender, EventArgs e)


{

}
}
}
4

Programa Iva

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

private void BtnLimpiar_Click(object sender, EventArgs e)


{
TxtSubtotal.Text = "";
TxtIva.Text = "";
TxtTotal.Text = "";

private void BtnCalcular_Click(object sender, EventArgs e)


{
double Subtotal, Iva, Total;
Subtotal = double.Parse(TxtSubtotal.Text);
Iva = Subtotal * 0.12;
Total = Subtotal + Iva;
TxtIva.Text = Iva.ToString();
TxtTotal.Text = Total.ToString();
}

private void BtnSalir_Click(object sender, EventArgs e)


{
this.Close();
}
}
}

You might also like