Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Numerical MethodsRSS Feeds

Polynomial addition, subtraction and multiplication

Posted By: Aloisa Miller     Category: C Programming     Views: 26105

Polynomial addition, subtraction and multiplication.

Code for Polynomial addition, subtraction and multiplication in C Programming

#include<stdio.h>
#include<conio.h>
#include "poly.h"void main()
{
    clrscr();

    Polynomial *p1,*p2,*sum,*sub,*mul;

    printf("\nENTER THE FIRST POLYNOMIAL.");
    p1=createPolynomial();

    printf("\nENTER THE SECOND POLYNOMIAL.");
    p2=createPolynomial();

    clrscr();

    printf("\nFIRST : ");
    displayPolynomial(p1);

    printf("\nSECOND : ");
    displayPolynomial(p2);

    printf("\n\nADDITION IS : ");
    sum=addPolynomial(p1,p2);
    displayPolynomial(sum);

    printf("\n\nSUBTRACTION IS : ");
    sub=subPolynomial(p1,p2);
    displayPolynomial(sub);

    printf("\n\nMULTIPLICATION IS : ");
    mul=mulPolynomial(p1,p2);
    displayPolynomial(mul);

    getch();
}
  
Share: 


Didn't find what you were looking for? Find more on Polynomial addition, subtraction and multiplication Or get search suggestion and latest updates.

Aloisa Miller
Aloisa Miller author of Polynomial addition, subtraction and multiplication is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
Omkar Prabhu Gaonkar from India Comment on: Jan 14
where is poly.h file?

View All Comments