about | help | code help+videos | done | prefs |
isRelativelyPrime
Returns true if the two integer arguments a and b are relatively prime. Two integers are relatively prime if the only positive integer (factor) that divides both of them is 1. For example, the factors of 14 are 2 & 7 and the factors of 15 are 3 & 5. 14 and 15 are relatively prime since they have no common factor. Both a and b will be larger than 1. isRelativelyPrime(14, 15) → true isRelativelyPrime(12, 15) → false isRelativelyPrime(22, 21) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 180 Post-solution available
Copyright Nick Parlante 2017 - privacy