Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

About

Program where you put the sides of the triangle and you got information if you can build a triangle with them.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Silesian University of Technology #TriangleChecker

Project created as homework for The Silesian University Of Technology. **

Problem

The triangle has 3 sides but not all of its lengths combinations can create a triangle. In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side.

Solution

Program asks for 3 numbers. Before checking triangle inequality numbers are sorted from the smallest to the largest and then checks if sum of two smaller numbers are equal or greater than the largest one. If they are then program returns information that user can build a triangle using these lenghts.

Usage

  1. In command prompt go to program directory
  2. Refer to program and write 3 numbers

Sample:

C:/../FirstProject 4 6 7

About

Program where you put the sides of the triangle and you got information if you can build a triangle with them.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages