Computer Science, asked by janithaa, 19 days ago

write a program length of 3 sides of triangle and check if these sides forms a triangel or not condition a+b

Answers

Answered by devindersaroha43
1

#include <iostream>

#include <cmath>

using namespace std;

int main()

{

   int a, b, c;

   cin >> a >> b >> c;

   if (pow(a,2) == pow(b,2) * pow(c,2) || pow(b,2) == pow(a,2) * pow(c,2) || pow(c,2) == pow(a,2) * pow(b,2))

       cout << "The sides form a triangle" << endl;

   else

       cout << "The sides do not form a triangle." << endl;

   return 0;

}

Similar questions