private static int setGCD()
{
int a, b;
gCD(a,0) = a; //here -the left-hand side of the assignment must be a variable//
gCD(a,b) = gCD(b,a%b); //here -the left-hand side of the assignment must be a variable//
finalNumer = enterNumer/gCD; //here -cannot make static reference to finalNumer, enterNumer, or gCD//
finalDenom = enterDenom/gCD;//here -cannot make static reference to finalDenom, enterDenom, gCD
}
此方法的目的是找到用户在上述编程中输入的分子和分母的最大公分母(GCD)。但我一直在说错误(在评论中),这让我感到困惑,因为这是我的老师在董事会上写的,但这对我来说绝对没有意义!请帮忙!作业的左侧必须是变量
通过上面的编程我的意思是编程没有在这里显示 – NeverWalkAlone
其中是在setGCD方法中调用的方法? – Kick
翻转:'a = gCD(a,0);' –