1. Write a JAVA method that expands a given binomial (ax + by)n, where integers a, b, n are user inputs. For example, if a = 2, b = -12, n = 4 are entered the method should print or return
(2x 12y)^4 = 16x^4 384x^3y + 3456x^2y^2 13824xy^3 + 20736y^4
Use the Pascals triangle method using only one 1-dim array to calculate all binomial coefficients.
Your main program should use an appropriate loop for repeated inputs.
Reviews
There are no reviews yet.