Find the type of triangle from the given sides | C ++ implementation to find the type of triangle with the help of the sides ; Function to find the type of triangle with the help of sides ; Driver Code ; Function Call
#include <bits/stdc++.h> NEW_LINE using namespace std ; void checkTypeOfTriangle ( int a , int b , int c ) { int sqa = pow ( a , 2 ) ; int sqb = pow ( b , 2 ) ; int sqc = pow ( c , 2 ) ; if ( sqa == sqb + sqc sqb == sqc + sqa sqc == sqa + sqb ) { cout << " Right - angled ▁ Triangle " ; } else if ( sqa > sqc + sqb sqb > sqa + sqc sqc > sqa + sqb ) { cout << " Obtuse - angled ▁ Triangle " ; } else { cout << " Acute - angled ▁ Triangle " ; } } int main ( ) { int a , b , c ; a = 2 ; b = 2 ; c = 2 ; checkTypeOfTriangle ( a , b , c ) ; return 0 ; }