Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. float func(float,float);
  5.  
  6. int main()
  7. {
  8. float x,y,hypotenous;
  9. printf("Enter the x value of triangle:\n");
  10. scanf("%f", &x);
  11. printf("Enter the y value of triangle:\n");
  12. scanf("%f", &y);
  13.  
  14. hypotenous=func(x,y);
  15. printf("Hypo is: %f",hypotenous);
  16.  
  17.  
  18. }
  19.  
  20. float func(float x, float y ){
  21.  
  22. float hypotenous=sqrt((x*x)+(y*y));
  23. return hypotenous;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement