Define a class called Polynomial with degree 2 (that is, all ax+bx+c), which has three private data
Fantastic news! We've Found the answer you've been seeking!
Question:
Define a class called Polynomial with degree 2 (that is, all ax+bx+c), which has three private data int a, b, c and two public member functions: setPoly(int, int, int) to set data and printPoly to print data in the following form: if a value is 0, don't show this term, if either b or c is negative, don't show +, if a orbis I, don't show 1. In the main function, declare an object, then call set Poly with some data and call printPoly. The sample output is: The polynomial is: 2 x^2-4 lif you put 2, 0, -4 in setPoly
Related Book For
Posted Date: