我一直在阅读一个关于查找gcd的示例,gcd是最大的通用除数程序,但它只在下面的代码中使用返回。那是什么?用这样的退货合法吗?我已经查过了,似乎没有什么能表明我的意思。请..。下面是代码:{
long tnum, tden, temp, gcd;// num = numerator and den = denumator
如果您感兴趣,下面是代码: * Implements Euclid's algorithm to find the GCD between two integers.* * The values to get the GCD fortemplate <int Lhs, int Rhs> * @tparam Gcd * @see euclid