

private void button1_Click(object sender, EventArgs e)
{
int a1, a2, a3;
int max=0;
a1 = int.Parse(textBox1.Text);
a2 = int.Parse(textBox2.Text);
a3 = int.Parse(textBox3.Text);
max = a1 > a2 ? (a1 > a3 ? a1 : a3) : (a2 > a3 ? a2 : a3);
MessageBox.Show("最大数是"+max,"提示",MessageBoxButtons.AbortRetryIgnore,MessageBoxIcon.Information);
}
该博客主要围绕C#进行,核心内容是使用C#进行数值大小比较,并找出其中的最大数,属于后端开发中C#语言的应用。

1270

被折叠的 条评论
为什么被折叠?



