global_procedure_body Read_Polynomial_And_X (
alters Character_IStream& input,
produces Polynomial_Coefficients& a,
produces Real& x
)
{
object Integer n, k;
input >> n;
a.Clear ();
while (k <= n)
{
object Real coeff;
input >> coeff;
a.Add (k, coeff);
k++;
}
input >> x;
}
how does this code work? I understand that input some Polynomial and it would produce coeff and x but when i trace the code i don't get the statement inside the while loop work?
Columbus Underground Messageboard » General Columbus Discussion » Everyday Chit Chat
Homework help Resolve C++ from osu
[5 posts] [5 contributors]
Topic Rating:
(Total Ratings: )
Rate this topic:





Rate this topic:
-
Posted 3 months ago #
-
Made me think of this:
Posted 3 months ago # -
answer: stop using c++
Posted 3 months ago # -
I don't know C++, but from what I can tell this piece of code is just to input the polynomial into memory --it's not actually doing any calculations.
You input n first. Then it gives you n prompts to enter coefficients. Finally you input x. Presumably there's more code that actually manipulates the polynomial.
Posted 3 months ago # -
do your own homework
Posted 3 months ago #
You must log in to post.



Launched in August 2010, TheMetropreneur.com is a local online resource devoted to small business development and entrepreneurship. Its aim is to tell the stories of Central Ohio's business community, foster regional economic development and assist entrepreneurs with its resource-heavy focus.