If I'm not wrong a triangle exists if the value of two of it's sides is bigger than the third one.
1 2 3 4 5 6 7 8 9 10 11 12 13
#include<iostream>
usingnamespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if(a+b>c && a+c>b && c+b>a) cout << "Yes, there is a triangle!" << endl;
else cout << "Sorry, there is no such triangle!" << endl;
system("pause");
return 0;
}
@vlad from moscow
Yeah you are right, but maybe the author of the post in not very good at Maths and doesn't know when a triangle exists .
Do you want me to delete my previous post?