Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / Pract. 02 / Solutions / task4.cpp
blob: acb471ce9ae8df743251e230571154de422e3427 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include<iostream>
using namespace std;
int main()
{
	 double a, b, c;

	 cout << "First side: ";
	 cin >> a;

	 cout << "Second side: ";
	 cin >> b;

	 cout << "Third side: ";
	 cin >> c;

	 if ((a + b > c) && (a + c > b) && (b + c > a))
	 {
		  cout << "Triangle is valid.\n";
	 }
	 else
	 {
		  cout << "Triangle is not valid.\n";
	 }

	 return 0;
}