+ 2

Given the sizes of three different sides, write a C program to find whether a triangle can be formed or not?

1st Dec 2016, 4:39 PM
Ram Naresh Arya
Ram Naresh Arya - avatar
2 Answers
+ 1
Thank you Sir. your reply my questions.
1st Dec 2016, 6:36 PM
Ram Naresh Arya
Ram Naresh Arya - avatar
0
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a+b>c && a+c>b && b+c>a) cout << "Yes, you can form a triangle.\n"; else cout << "No, you can't form a triangle.\n"; return 0; }
1st Dec 2016, 6:36 PM
Ɓukasz D
Ɓukasz D - avatar