Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- float func(float,float);
- int main()
- {
- float x,y,hypotenous;
- printf("Enter the x value of triangle:\n");
- scanf("%f", &x);
- printf("Enter the y value of triangle:\n");
- scanf("%f", &y);
- hypotenous=func(x,y);
- printf("Hypo is: %f",hypotenous);
- }
- float func(float x, float y ){
- float hypotenous=sqrt((x*x)+(y*y));
- return hypotenous;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement