LAB 03A - TRIANGLE CLASSIFIER

Concepts

The goal of this lab is to practice the use of if-else statements by classifying triangles based on their sides. It will also teach you how to correctly compare two double variables for equality using a tolerance factor. Your solution will be submitted with HW 03 next Wednesday.

Instructions

Create yourself an empty project. Since we assume you have been doing our class assignments, we assume you know how to do this by now. Call this project Lab03A.

Write code to first read three real value measurements, i.e., your program should prompt the user to enter the three real values (which should be stored as three double variables). Once done, write code to determine whether the three real value measurements make a triangle. If yes, your program should tell the user whether the triangle is a right, acute, or obtuse triangle (see hints below). If no, your program should politely terminate with an appropriate error message.

The user should be allowed to enter the three real values in any order; in other words, your program should not assume any particular input order such as ascendant or descendant.

Hints

Lab Submission

You will submit your solution to this lab with your third homework assignment. Detailed instructions for doing this are posted in Homework 03.