请帮我改正下错误
下面的代码该怎样改正。搞了半天都不懂。using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 函数对比大小值
{
class Program
{
static void Main(string[] args)
{
int a = Convert.ToInt32(Console.ReadLine());
int b = Convert.ToInt32(Console.ReadLine());
int k =minnum(a, b); //就这里有问题
Console.WriteLine(k);
}
int minnum(int a, int b)
{
int c = 0;
if (a > b)
{
c =b;
}
else if (a < b)
{
c =a;
}
return c;
}
}
}