public static void Main()
{
int m,n,temp;
Console.WriteLine("please input m,n:");
Console.ReadLine();
if(m<n)
{
m=temp;
n=temp;
m=n;
}
a5 mya5=new a5();
mya5.gcm();
Console.WriteLine("m={0},n={1},j={2}",m,n);
}
public int gcm(int m,int n)
{
int temp,k;
while(n!=0)
{
temp=m%n;
m=n;//余数为0
n=temp;
}
k=m;//最大公约数
return(k);
}
c:\inetpub\wwwroot\c\a5.cs(29): 重载“gcm”方法未获取“0”参数
就是此句: mya5.gcm();
{
int m,n,temp;
Console.WriteLine("please input m,n:");
Console.ReadLine();
if(m<n)
{
m=temp;
n=temp;
m=n;
}
a5 mya5=new a5();
mya5.gcm();
Console.WriteLine("m={0},n={1},j={2}",m,n);
}
public int gcm(int m,int n)
{
int temp,k;
while(n!=0)
{
temp=m%n;
m=n;//余数为0
n=temp;
}
k=m;//最大公约数
return(k);
}
c:\inetpub\wwwroot\c\a5.cs(29): 重载“gcm”方法未获取“0”参数
就是此句: mya5.gcm();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货