Program to Add two polynomials
Program to Add two polynomials(Source Code)
// Program Ch02pr05
// Program to Add two polynomials
#include <iostream\> #include <conio.h\> using namespace std; const int MAX \= 10 ; class poly { private : struct term { int coeff ; int exp ; } t ; int noofterms ; public : poly( ) ; void polyappend ( int c, int e ) ; void polyadd ( poly &p1, poly &p2 ) ; void display( ) ; } ; // initializes data members of class poly poly :: poly( ) { noofterms \= 0 ; for ( int i \= 0 ; i < MAX ; i++ ) { t.
[Read More]