Closed
Description
What would you like to Propose?
I did not see a geometric mean function in maths.
I added a test feature in the attachment I obviuously would change it according to the rules of the repository if assigned to me.
Issue details
Missing geometric mean function in maths src/main/java/com/thealgorithms/maths
Additional Information
public class test {
public static void main(String[] args) {
int[] test = {3,4};
System.out.println(geometric_mean(test));
}
public static double geometric_mean(int[] num) {
int result=0;
for(int i:num){
result+=i*i;
}
return Math.pow(result,1.0/ num.length);
}
}