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 _5th_Program_Subject_Waise_Fail_Pass { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { int Urd, Eng, Mat, Sci, Total, Per; Urd = Convert.ToInt16(textBox1.Text); Eng = Convert.ToInt16(textBox2.Text); Mat = Convert.ToInt16(textBox3.Text); Sci = Convert.ToInt16(textBox4.Text); Total = Urd + Eng + Mat + Sci; textBox5.Text = Total.ToString(); Per = Total / 4; textBox6.Text = Per.ToString(); if (Urd > 35 && Eng > 35 && Mat >35 && Sci >35) { textBox7.Text = "Pass"; } else { textBox7.Text = "Fail"; } } } }