fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5.  
  6. int main() {
  7. int m,n, side1, side2;
  8. float hypotenuse;
  9. cout<< "enter the two numbers please"<<endl;
  10. cin>> m>> n;
  11. side1 = abs (pow(m,2)-pow(n,2));
  12. side2 = 2*m*n;
  13. hypotenuse=sqrt(side1*side1+side2*side2);
  14. cout << "side one is:"<< side1 <<endl;
  15. cout << "side two is:"<< side2 <<endl;
  16. cout << "hypotenuse is:"<< hypotenuse<<endl;
  17.  
  18. // your code goes here
  19. return 0;
  20. }
Success #stdin #stdout 0s 4416KB
stdin
5
10
stdout
enter the two numbers please
side one is:75
side two is:100
hypotenuse is:125