public class Test { publicstatic void main(String[] args) { System.out.println(t1(10)); System.out.println(t2(2,3)); }
/** * (1) A=Pi*r^2 - formula for the area of acircle * * @param r - radius of the circle * @return */ publicstatic double t1(double r) { returnMath.PI*r*r; }
/** * (2) C=n!/r!(n-r)! - combination Inmathematics a combination is a way of * selecting several things out of a largergroup, where (unlike * permutations) order does not matter. * * @param r * @param n * @return */ publicstatic int t2(int r,int n) { returnfact(n)/(fact(r)*fact(n-r)); } /** * factorial calculation * @param n * @return */ publicstatic int fact(int n) { if(n<1) { return1; } else { returnn*fact(n-1); } }
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment