form1.cs
来自「Visual C#2005程序设计教程」· CS 代码 · 共 32 行
CS
32 行
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WinApp4_15比较数值大小
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int a, b, c;
a = int.Parse(txtA.Text);
b = int.Parse(txtB.Text);
c = int.Parse(txtC.Text);
if (a <= b && a <= c)
lblRseult.Text = "较小的值为:" + a;
else if(b<=a&&b<=c)
lblRseult.Text = "较小的值为:" + b;
else
lblRseult.Text = "较小的值为:" + c;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?