Recall
the Problem.
Write a program for determining the type of triangle given its three
= side lengths.
1. Defining the problem
Input: Float numbers A, B and C representing the three sides.
Output: One or more messages = indicating the type of triangle input.
Processing:
Employ functions that use conditional expressions and selection to determine
the corresponding triangle type.
2. Planning the solution using functions and top-down = design
Initial Algorithm
1. Get Data using reference parameters
Get_Data(SideA, SideB, SideC)
2. Test the data to determine triangle type
a. Test whether triangle is equilateral using value parameters.
EquilatTest(SideA, SideB, SideC)
b. Test whether triangle is right triangle using constant reference parameters
RightTriTest(SideA, SideB, SideC)
3. Output results.
//*************************************************************************
//PREPROCESSOR DIRECTIVES
void Get_Data(float&, float&, float&);
int EquilatTest(float, float, float);
int RightTriTest(const float&, const float&, const float&);
int main()
//DESCRIPTION OF PROGRAM
Get_Data(SideA, SideB, SideC);
} //END main()
//Example of using Reference Parameters
//Example of using Value Parameters
//Example of using Constant Reference Parameters