0% found this document useful (0 votes)
3 views6 pages

Add Two Polynomials Using Linked List

This document presents a bridge course project for a Bachelor of Technology in Computer Science and Engineering, focusing on adding two polynomials using linked lists. It includes a problem statement, module descriptions, an algorithm, a flowchart, and applications of the program. The project is submitted by a group of students from G.L. Bajaj Group of Institutions for the academic session 2018-19.

Uploaded by

raawatarun
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Add Two Polynomials Using Linked List

This document presents a bridge course project for a Bachelor of Technology in Computer Science and Engineering, focusing on adding two polynomials using linked lists. It includes a problem statement, module descriptions, an algorithm, a flowchart, and applications of the program. The project is submitted by a group of students from G.L. Bajaj Group of Institutions for the academic session 2018-19.

Uploaded by

raawatarun
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

BRIDGE COURSE

SubmittedPROJECT
for partial fulfillment of award of
BACHELOR OF TECHNOLOGY
In
Computer science & engineering
By
KALPANA(1751110047) ALISHA SAIFI(1751110014) ASHWANI RAWAT(1751110025)
(GROUP NO. 6) ( SECTION: A )

SESSION 2018-19
G.L BAJAJ GROUP OF INSTITUITIONS, MATHURA
(affiliated to AKTU, Lucknow)
OCTOBER, 2018
CONTENTS
 STATEMENT OF PROBLEM
DESCRIPTION OF MODULES
ALGORITHM
FLOWCHART
PROGRAM
APPLICATIONS OF PROGRAM
STATEMENT OF PROBLEM ?
QUESTION:

WRITE A PROGRAM TO
ADD TWO POLYNOMIALS
IMPLEMENTING THEM
THROUGH LINKED LIST.
DESCRIPTION OF MODULES
• Create(void): This will take input(coefficient and
power) from the user and create the polynomial
list and return the starting address of the list.
• Print(struct poly*): This will print the
polynomial equation using ^ sign for power for
example ‘x to the power 3’ will be printed as ‘x^3’.
• Sum(struct poly* a, struct poly*b): this will
add a & b and return the base address of the
resulting polynomial.
ALGORITHM
Poly_add(P,Q) While(temp!=NULL)
{ S=(pnode*)malloc(sizeof(pnode))
temp=P, ptr=Q S->coeff=temp->coeff
While(temp!=NULL && ptr!=NULL) S->expo=temp->expo
{ A->next=S
S=(pnode*)malloc(sizeof(pnode)) A=S
if(temp->expo==ptr=exponent) temp=temp->next
S->coeff=temp->coeff->ptr->coeff While(ptr!=NULL)
S->expo=temp->expo S=(pnode*)malloc(sizeof(pnode))
Temp=temp->next S->coeff=ptr->coeff
Ptr=ptr->next S->expo=ptr->expo
else A->next=S
if(temp->expo>ptr->expo) A=S
S->coeff=temp->coeff Ptr=ptr->next
S->expo=temp->expo A->next =NULL
temp=temp->next }
else
S->coeff=ptr->coeff
S->expo=ptr->expo
ptr=ptr->next
If(R==NULL)
R=S
A=S
Else
A->next=S
A=S
}

You might also like