C program for Polynomal using a circular linked list


/*
 Represent a Polynomal using a circular linked list and write
 menu driven program to perform addition,multiplication and
 evaluation.
*/

output :>
1)Create first polynomial                                                      
2)Create second polynomial                                                      
3)Print first polynomial                                                        
4)Print second polynomial                                                      
5)Add                                                                          
6)Multiply
7)Evaluate First Polynomial                                                    
8)Quit                                                                          
Enter Your Choice: 1                                                            
                                                                                 
Enter No. of Terms:2                                                            
                                                                                 
enter a term as a tuple of (power,coefficient) : 1 3 2 1                        
                                                                                 
1)Create first polynomial                                                      
2)Create second polynomial                                                      
3)Print first polynomial                                                        
4)Print second polynomial                                                      
5)Add                                                                          
6)Multiply
7)Evaluate First Polynomial
8)Quit
Enter Your Choice: 3
 
  3.00x^1     1.00x^2
1)Create first polynomial
2)Create second polynomial
3)Print first polynomial
4)Print second polynomial
5)Add
6)Multiply
7)Evaluate First Polynomial
8)Quit
Enter Your Choice: 2
 
Enter No. of Terms:2
 
enter a term as a tuple of (power,coefficient) : 5 1 6 2
 
1)Create first polynomial
2)Create second polynomial
3)Print first polynomial
4)Print second polynomial
5)Add
6)Multiply
7)Evaluate First Polynomial
8)Quit
Enter Your Choice: 5
 
  3.00x^1     1.00x^2     1.00x^5     2.00x^6
1)Create first polynomial
2)Create second polynomial
3)Print first polynomial
4)Print second polynomial
5)Add
6)Multiply
7)Evaluate First Polynomial
8)Quit
Enter Your Choice: 6
 
  3.00x^6     7.00x^7     2.00x^8
1)Create first polynomial
2)Create second polynomial
3)Print first polynomial
4)Print second polynomial
5)Add
6)Multiply
7)Evaluate First Polynomial
8)Quit
Enter Your Choice: 7
 
Enter the value of X:2
 
Evaluated value =  10.00
1)Create first polynomial
2)Create second polynomial
3)Print first polynomial
4)Print second polynomial
5)Add
6)Multiply
7)Evaluate First Polynomial
8)Quit

Enter Your Choice: 8