Program that determine triangle types and number of possible triangles can be generated with three inputs provided by user.
- Complete Triangle
- Table Of Content
- Introduction
- Infrastructure Setup and Installation
- Highlight
- About
Triangles can be classified by various properties and characteristic relating to their angles and sides. A triangle has three sides and three angles and these angles always add to 180°.
The type of triangle can be classify whether there are:
- Scalene (all sides are different)
- Isosceles (two sides are equal)
- Equilateral (all three sides are equal)
Pythagorean Theorem can be used to determine whether the triangle is:
- Right Angle (a^2 * b^2 = c^2)
- Acute Angle (a^2 * b^2 > c^2)
- Obtuse Angle (a^2 * b^2 < c^2)
-
Download and install Rust compiler according to official Rust documentation.
-
Clone the sourcecode from Git:
$ git clone https://github.com/CodesAreHonest/complete-triangle.git
- Change directory to the cloned repository:
$ cd complete-triangle
- Compile and run the sourcecode with Cargo:
$ cargo build
Compiling complete-triangle v0.1.0 (file:<directory>)
Finished dev [unoptimized + debuginfo] target(s) in 2.3 secs
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/complete-triangle`
Input number for variable a ->
- The program is running when it required to user to input number for three variables. The program only accepts integer as input in order to determine whether the three variables obtain are valid to form a triangle.
- RustDT Eclipse IDE Plugin
- Git
- GDB Debugger
- Eclipse for Parallel Application Developers IDE
- Rust Compiler 1.20.0
The image below is the screenshot of the program.
- Chai Ying Hua
This repository is still developing and maintaining as pet project.