CS 282 Winter 2003

Assignment 5

3/31/2003

Due date: 4/11/2003 6:00 PM

  1. (20 points – all for extra credit) Write a SAL program that computes the areas of two triangles and finds out which triangle is larger in area. This program should use a procedure to find the area of the triangle, and thus this procedure will be called twice in the program. Accept base and height as input from the user for each of the triangles. Use the formula (1/2 * base * height ), for finding the areas.