Computer Science, asked by pbguardian07, 1 month ago

Accept three angles of a triangle. Check and print whether it will form an equilateral triangle (each angle should be equal to 60)or scalene triangle(None of them should be equal to each other,)

Answers

Answered by imarkoji0123
0

#include<bits/stdc++.h>

using namespace std;

 

bool checkValidity(int a, int b, int c)

{

   // check condition

   if (a + b <= c || a + c <= b || b + c <= a)

       return false;

   else

       return true;

}

 

int main()

{

   int a = 7, b = 10, c = 5;

     

   if (checkValidity(a, b, c))

       cout << "Valid";

   else

       cout << "Invalid";    

}

Similar questions