using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int a,b,y;
a=13;
b=14;
y=Max (a,b);
textBox1.Text = y.ToString();
}
private
int Max(int n1, int n2)
{
if (n1 > n2)
{
return n1;
}
else
{
return n2;
}
}
}
}
正确的。