Tips for Assignment 5


Problem 1

The formula (2 g^3 + x)/(3 g^2) describes the relationship between oldg and newg; use it to calculate the one from the other by writing a function better. If you prefer, you can modify the declaration of better so that the function will take the value of x as an argument as well.

Problem 2

Since you do not know in advance how many values will be entered, it is not a good idea to use an array for this problem.

Problem 3

Each post has integer coordinates, and there is a post at every point that has integer coordinates. When counting posts for your fence, include the starting point and the end point.


Last update:  06/08/00 11:55