PromotionBanner

解答

for(int i = 2; i <=(a>b? a: b); i++)
if((a%i == 0) &&(b %i == 0))
gcd = i

留言
您的問題解決了嗎?