Programming Assignment

Calculations

Write a program which will:

1. calculate and print the square, cube, and square root for all integers between 2 and 9.

2. calculate and print the value of y for the below equation, for all values of x, where x begins at 2 and increments by 1 until (and including) x = 9:

    2x2 - 3x
y = ______________________

          x + 2

Use the math.h library to help you with this assignment.

Hand in a copy of the program and a copy of the output from the program.

Make sure your output is easy for me to follow.

The first part of your output should have 4 columns: the number, the square, the cube, and the square root.
The second part should have 2 columns, one for the value of x and one for the value of y.

Check that y gets printed out as a double and not an int.

Remember to begin each program with a comment stating your name and a program description.