![]() |
What is a Java program that finds the greatest common factor of three integers?In: Computer Programming, JAVA |
[Edit] |
[Edit]
public class GCD {
public static int gcd(int a, int b) {
return (b == 0 ? a : gcd(b, a % b));
}
public static int gcd(int a, int b, int c) {
return gcd(gcd(a, b), c);
}
}
First answer by Ognira. Last edit by Snoopyjc. Contributor trust: 62 [recommend contributor]. Question popularity: 1 [recommend question]
|
Research your answer: |
Can you answer other
questions about programming?
- Organizational policies related to quality the particular projects scope statement and product descriptions and related standards and regulations are all important input to the quality planning pro?
- Password to get into bertanica?
- How do you do a mysql full text search?
- How do you develop propositional tree using the same label links as those used in human associative memory ham?




