Structure
Structure
#include <stdio.h>
struct Term {
int coeff;
int exp;
};
void addPolynomials(struct Term p1[], int n1, struct Term p2[], int n2, struct
Term result[], int *nResult) {
int i = 0, j = 0, k = 0;
int main() {
int n1, n2, nResult;
struct Term p1[10], p2[10], result[20];
return 0;
}
Output
Enter number of terms in 1st polynomial: 2
Enter terms (coeff exp):
42
61
Enter number of terms in 2nd polynomial: 2
Enter terms (coeff exp):
52
31
Result: 9x^2 + 9x^1