fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. double foundBisector(int a, int b, int c) {
  6. return sqrt(a*b*(a+b+c)*(a+b-c))/(a+b);
  7. }
  8.  
  9. int main() {
  10. int a, b, c;
  11. cin >> a >> b >> c;
  12. if (a + b > c && b + c > a && a + c > b) {
  13. cout << "Bisector = " << (double)foundBisector(a, b, c);
  14. } else {
  15. cout << "wrong sides";
  16. }
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 4404KB
stdin
Standard input is empty
stdout
wrong sides