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 WindowsFormsApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { if (int.Parse(textBox1.Text) >= 80 && (int.Parse(textBox1.Text) <=100)) { textBox2.Text = "A"; } else if (int.Parse(textBox1.Text) >= 75 && (int.Parse(textBox1.Text) <= 79)) { textBox2.Text = "B+"; } else if (int.Parse(textBox1.Text) >= 70 && (int.Parse(textBox1.Text) <= 74)) { textBox2.Text = "B"; } else if (int.Parse(textBox1.Text) >= 65 && (int.Parse(textBox1.Text) <= 69)) { textBox2.Text = "C+"; } else if (int.Parse(textBox1.Text) >= 60 && (int.Parse(textBox1.Text) <= 64)) { textBox2.Text = "C"; } else if (int.Parse(textBox1.Text) >= 55 && (int.Parse(textBox1.Text) <= 59)) { textBox2.Text = "D+"; } else if (int.Parse(textBox1.Text) >= 50 && (int.Parse(textBox1.Text) <= 54)) { textBox2.Text = "D"; } else if (int.Parse(textBox1.Text) >= 0 && (int.Parse(textBox1.Text) <= 49)) { textBox2.Text = "E"; } else { textBox2.Text = "?"; } } } }