+ 2
Given the sizes of three different sides, write a C program to find whether a triangle can be formed or not?
2 Answers
+ 1
Thank you Sir. your reply my questions.
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;
}