promedio final
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace promedio_final
{
public partial class frmpromediofinal : Form
{
public frmpromediofinal()
{
InitializeComponent();
}
private void btnCalProm_Click(object sender, EventArgs e)
{
decimal nota1,nota2,notafinal;
nota1 = (Convert.ToDecimal(this.textBox1.Text) + Convert.ToDecimal(this.textBox2.Text)) / 2;
nota2 = (Convert.ToDecimal(this.textBox3.Text) + Convert.ToDecimal(this.textBox4.Text)) / 2;
notafinal = (nota1 + nota2) / 2;
this.txtPromedio.Text= Convert.ToString(notafinal);
}
private void btnLimpiar_Click(object sender, EventArgs e)
{
txtPromedio.Text = "";
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text="";
}
}
}
0 Response to "promedio final"
Publicar un comentario