View Single Post
Old 05-17-2007, 08:00 AM   #1 (permalink)
TAboy24
Recruit
 
Join Date: May 2007
Posts: 2
TAboy24 is on a distinguished road
Thats a taugh problem!!

Hey people!
I need writing descending polynom of the form :
(CX^n)+(CX^n-1)+.....+(CX^1)+(C^0)
every part of the polynom(for example CX^n-1 is one part of many) is represented as:
Typedef struct monom {
int coeficient; //(the "C")
int power; //(the "n")
}Monom;

!*!)write a program getting input 2 polynoms and prints the sum polynom and the multiply polynom of these 2 inputs in diferent lines...

comments: coefficient(C) is never 0 and also the output C isnt!
every polynom of the input is actually a line (unknown length) of pairs(coeficient and power)..for example:
2 4 -5 1 0 6 6 4 -8 0 7 3 represents: 8x^4+7x^3-5x-8 !!


Thats really taughmaybe you suceed better then me
TAboy24 is offline   Reply With Quote