Some numbers like 1,2,3,4,.... are provided from the command line. Considering them to be roots of a polynomial of that degree< equal to number of roots > , i was trying to find the coefficients of the constructed polynomial, i was using the concept of multiplication of two single degree polynomials.
for e.g if the numbers are 1,2 and3.
the P(x) == (x-1)(x-2)(x-3).
so if give 1 and 2 in the command line. the sample output should be 1 , -3, 2.
Please help me......
jits_aps90
0
Newbie Poster
Recommended Answers
Jump to Post1) First, represent a polynomial (of the form c_0 + c_1*x + c_2*x^2 + .... c_n*x^n) is represented by an array with elements (c_0, c_1, c_2, c_3, .... c_n).
2) Work out how to multiply two arbitrary polynomials together. ie. given a polynomial A (a_0, a_1, a_2, a_3, .... …
All 4 Replies
Parv_boy
0
Newbie Poster
grumpier
149
Posting Whiz in Training
Salem
commented:
Make it count rep added.
+21
jits_aps90
0
Newbie Poster
jits_aps90
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.