logic for finding coprime pairs in a given array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

logic for finding coprime pairs in a given array

25th Jun 2017, 5:55 AM
Manideep
Manideep - avatar
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.
25th Jun 2017, 8:30 AM
Manideep
Manideep - avatar
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.
26th Jun 2017, 4:03 AM
Venkatesh Pitta
Venkatesh Pitta - avatar
0
thanks a lot
26th Jun 2017, 4:39 AM
Manideep
Manideep - avatar