Programming Tasks

Homework - For the TI Calculator

Homework - For the Electronic Spreadsheet (Excel)

Writing a program to carry out a mathematical process is a wonderful thing to do. It brings together knowledge of mathematics, logic, and programming.

Note: All programs should include an IF statement.

  1. Ask for two angle ("alpha" and "beta" - could be called something else). Report the sine, cosine, and tangent of the sum fo the angles and the difference of the angles.
  2. Ask for an angle ("alpha" - could be called something else). Report sine, cosine, and tangent of twice the angle.
  3. Ask for an ordered pair (a point P). Report the distance P is from the origin and the angle of rotation from the positive x-axis to the ray from the origin through point P. The angle should be a positive angle less than 360°.
  4. Ask for the three sides of a triangle. Use Heron's formula to report the area of the triangle.
  5. Ask for n (number of sides of an n-gon). Report the sum of the interior angles of the n-gon. Report the measure of one angle of a regular n-gon.
  6. Ask for n (number of sides of an n-gon). Assume the length of each side of the regular n-gon is one (1 unit). Report the length of the apothem and the area of the n-gon.
  7. Ask for m and n. Check to see if they are relatively prime. If they are relatively prime, report the Pythagorean Triple generated by m and n (m² + n², m² - n², and 2mn).
  8. Have a two-choice menu giving the user two choices: to input two legs, or input a leg an the hypotenuse of a right triangle. Report the third side.
  9. Ask for A, B, C, and D in y = Ax + B and y = Cx + D. Report the intersection point.
  10. Ask for two ordered pairs. Report the distance between the points and the equation of the line.
  11. Ask for m, b, r, s, and t in y = mx + b and y = rx² + sx + t. Find the intersection points of the line and parabola.

Back to Jim Olsen's homepage
James R. Olsen, Western Illinois University
E-mail: jr-olsen@wiu.edu
Page last updated: September 2, 2008