# Thread: Calculator Script...but what's it doing?

1. Junior Guru Wannabe
Join Date
Jul 2003
Posts
64

## Calculator Script...but what's it doing?

I ran accross this program in my math book today and I wasn't sure what exactly it's doing. Below is what it says it does, and then the actual script.

"Helps you find the quotient and remainder when you divide a polynomial of the form ax^2 + bx + c by a binomial of the form x - r. You enter the values of a, b, c, and r when prompted."

PROGRAM; POLYDIV
: Disp "ENTER A,B,C"
: Prompt A: Prompt B: Prompt C
: Disp "ENTER R"
: Prompt R
: Disp "COEFFICIENTS"
: Disp "OF QUOTIENT:"
: Disp A
: Disp B+A*R
: Disp "REMAINDER:"
: Disp C+B*R+A*R^2

One example I tried out was (b^2 + 9b - 7) / 3b. I worked out all that it displays and I get the following:

A = 1
B+A*R = 9
C+B*R+A*R^2 = -7

I get (b/3) + 3 - (7/3b) when I work it out by hand, and a teacher of mine got the same thing. What exactly is this program finding, since it obviously isn't any coefficients?

2. Web Hosting Master
Join Date
Apr 2001
Location
UK - Liverpool
Posts
2,169
I got a D in my math exam, i dont even know what a coefficient is

3. Web Hosting Master
Join Date
Mar 2002
Location
Orlando, FL
Posts
12,200
It's finding wrong results

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•