+ 1
logic for finding coprime pairs in a given array
4 Answers
0
That's a code for counting coprime pairs in an array in Java,it got some errors,I am novice programmer,can anybody help me with the code.
0
pairs of coprimes. well, for every pair in the given array, if the pair's GCD is 1, it is a coprime pair. GCD is simple Euclid algorithm.
EDIT: Here is a sample: https://code.sololearn.com/c2OY1bTF3hDl
No useful error diagnostics from your code, so wrote a new one.
0
thanks a lot