Question: I just want to show an equation numbers on the screen. Please. That's all.

I have a function. It's calculating coefficients of a polynomial.

So when it's done, I have the variables a0, a1, a2,a3 ... aN

where N is an input value and could be any positive integer.

 

Now, I just want to show them on the screen. So if I have, say , a0=1.3 and a1=5.76, I want this to appear:

1.3x + 5.76x2

 

That's all. I just want a loop that does this:

for term from 1 to N do:

    print( a0 ); print (x^N); print ("+");

od:

so all the terms come out on the same line, as in my example above. I've tried so many ways, but each time it ignores the numerical values of a0 and just writes "a0" on the screen, or breaks it up into a set, or puts || marks everywhere, or does it on sequential lines, or something or something or something.

Please Wait...