C# öğrenci notu hesaplama

Konu sahibi son olarak 3308 gün önce görüldü
Kod:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
 
 private void button1_Click(object sender, EventArgs e)
{
int y1, y2, p;
double sonuc;
y1 = int.Parse(textBox1.Text);
y2 = int.Parse(textBox2.Text);
p = int.Parse(textBox3.Text);
sonuc = (y1 + y2 + p) / 3;
textBox4.Text = sonuc.ToString();
if (sonuc >= 50)
{
label6.Text = "Geçtiniz";
}
else
{
label6.Text = "Kaldınız";
}
}
}
}
 
Geri