Professional Documents
Culture Documents
Notes
Notes
h>
Typedef struct {
} term;
Int n;
Scanf(“%d”, &n);
Int I = 0, j = 0, k = 0;
If (poly1[i].exp == poly2[j].exp)
Result[k].exp = poly1[i].exp;
I++;
J++;
Result[k].coef = poly1[i].coef;
Result[k].exp = poly1[i].exp;
I++;
Else {
Result[k].coef = poly2[j].coef;
Result[k].exp = poly2[j].exp;
J++;
K++;
Int I = 0;
While (poly[i].coef != 0)
If (poly[i+1].coef != 0) {
Printf(“+ “);
I++;
}
Printf(“\n”);
// Main function
Int main() {
Read_polynomial(poly1);
Read_polynomial(poly2);
Display_polynomial(result);
Return 0;