Result Based on Percentage

Design

    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 _4th_Program_4Subject_Fail_Pass_Per
    {
        public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
            private void button1_Click(object sender, EventArgs e)
            {
                int Eng, Mat, Urd, Sci, Total, Per;

                Eng = Convert.ToInt16(textBox1.Text);
                Mat = Convert.ToInt16(textBox2.Text);
                Urd = Convert.ToInt16(textBox3.Text);
                Sci = Convert.ToInt16(textBox4.Text);

                Total = Eng + Mat + Urd + Sci;
                textBox5.Text = Total.ToString();

                Per = Total / 4;
                textBox6.Text = Per.ToString();

                if (Per>35)
                {
                    textBox7.Text = "Pass";
                }
                else
                {
                    textBox7.Text = "Fail";
                }                
            }
        }
    }
                

Output

Output Example