fork download
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5. float a,b,h;
  6. printf("Enter the sides of the right triangle:");
  7. scanf("%f%f",&a,&b);
  8. h=sqrt(a*a+b*b);
  9. printf("The hypotenuse length is:%f",h);
  10. return 0;
  11. }
Success #stdin #stdout 0s 5296KB
stdin
45
stdout
Enter the sides of the right triangle:The hypotenuse length is:45.000000