You are on page 1of 2

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

private void button1_Click(object sender, EventArgs e)


{
double examen, trabajopractico, plataforma, actyval, notafinal, resultado,
literal;
string condicion, literal2;

examen = double.Parse(txtexamen.Text);
trabajopractico = double.Parse(txttrabajopractico.Text);
plataforma = double.Parse(txtplataforma.Text);
actyval = double.Parse(txtactyval.Text);
notafinal = examen + trabajopractico + plataforma + actyval;
txtnotafinal.Text = notafinal.ToString();

if (notafinal<=69)
{
condicion = "Desaprobado";
txtresultado.Text = condicion.ToString();
}
else
{
condicion = "Aprobado";
txtresultado.Text = condicion.ToString();
}

if (notafinal>= 59)
{
literal2 = "F";
txtliteral.Text = literal2;
}
else if (notafinal>=60 && notafinal<=69)
{
literal2 = "D";
txtliteral.Text = literal2;
}
else if (notafinal>=70 && notafinal<=79)
{
literal2 = "C";
txtliteral.Text = literal2;
}else if (notafinal>= 80 && notafinal<= 89)
{
literal2 = "B";
txtliteral.Text = literal2;
} else if (notafinal>= 90 && notafinal>= 100)
{
literal2 = "A";
txtliteral.Text = literal2;
}
}

private void label1_Click(object sender, EventArgs e)


{

}
}
}

You might also like