Co-Prime Program in Java

Co-Prime Program in Java

Co-Prime Program in Java Two numbers are co-prime if they only have 1 as a common factor. Or we can also say that their GCD (Greatest Common Divisor) or the HCF (Highest Common Factor) is 1. Example: 8 and 9. I have used the division method to find the GCD of two numbers and then check if it is 1 or not. If 1, then the numbers are co-prime, otherwise they are not co-prime. #coprime #icse #computerapplications #java