diff --git a/algorithms/polynomialsum.c b/algorithms/polynomialsum.c new file mode 100644 index 00000000..3a24927c --- /dev/null +++ b/algorithms/polynomialsum.c @@ -0,0 +1,85 @@ +/*Representation of polynomial and summation of two polynomials*/ +#include +typedef struct +{ + int exp; + float coeff; +}terms; +void inputPoly(terms a[],int n) +{ + printf("Please enter the input in descending order of degrees \n"); + for(int i=0;ib[j].exp) + { + c[k].exp=a[i].exp; + c[k].coeff=a[i].coeff; + i++;k++; + } + else if(a[i].exp